Error Message:

Can't send after socket shutdown.

Explanation:

A request to send data was disallowed because the socket had already been shut down with a previous shutdown() call. By calling shutdown() you do a partial close of a socket, which means you have discontinued sending. The Winsock implementation will not allow you to send after this. In a TCP/IP scenario calling shutdown() with how=1 or how=2 sends a TCP FIN packet to the remote address, which literally means "I'm done sending." If the local host sent any more data after that point, it would be in clear violation of the TCP specification (RFCs 793 and 1122).

User Action:

No matter what value you use for the "how" parameter to the shutdown() function, you cannot send afterwards. You can avoid making the mistake of trying to send on a socket after you've initiated a close by keeping track of the socket state in your application (and checking it before you attempt I/O)