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