Close the other end of the stream.
void close_remote();
This end of the connection will see error::eof after reading all the remaining data.
error::eof