...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Close the stream.
void close();
The other end of the connection will see error::eof
after reading all the remaining data.