Hi @Bill Son Makmur ,
I tested Complete Winsock Client/Server Code, the picture you uploaded should be the result from Winsock Server Code. This behavior is normal and means that the code is executing as expected. After the breakpoint we can see that the value of iResult
is 0, and then observe the code:
if (iResult != 0) {
printf("getaddrinfo failed with error: %d\n", iResult);
WSACleanup();
return 1;
}
Only output if iResult
is not equal to 0.
Similarly, for functions such as socket
in the subsequent code, you could enter their documentation by pressing F1 on them. We can clearly find that there is no statement output because neither ListenSocket
nor iResult
meets the judgment condition of if()
.
Best regards,
Elya
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.