Destroys the socket.
~basic_stream_socket();
This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling cancel.
cancel