...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Destructor.
~basic_stream();
If an asynchronous read operation is pending, it will simply be discarded with no notification to the completion handler.
If a connection is established while the stream is destroyed, the peer
will see the error net::error::connection_reset
when performing any reads or writes.