recins winsock (SOCKET_ERROR), - WSAGetLastError, 0 .
I first found this error when switching from debug mode to release mode. My code worked fine while debugging, but would disable clients in release mode.
The reason for this is that the receive buffer is not large enough. But this is not documented anywhere. In my case, the release mode made things fast enough to overflow the buffer.
Simply increasing the size of the buffer will solve the problem (the third parameter in recv.
I hope for this help. good luck
source
share