socket error 10035

The server got stuck when I was doing the test yesterday. I found that the server did not return the message when it called the send function. As a result, the thread of message processing was stuck there.
Based on the online data, I can probably tell that either the sender is out of cache or the receiver is out of cache.
And my socket is not set to non-blocking mode, so it’s stuck here with no return.
 
The solution is to change the socket to non-blocking mode

 
In this way, if the send fails, it can return immediately, and the server won’t be stuck there.
At this time, if the send is unsuccessful, the return value of the send is error 10035.
 
Then I checked the test client and realized that my client did not receive at all.
That’s weird.

Read More: