Close the timed stream.
void close();
This cancels all of the outstanding asynchronous operations as if by calling basic_stream::cancel, and closes the underlying socket.
basic_stream::cancel