Does partial shutdown modes (SHUT_RD, SHUT_WR) should necessarily release the socket handle?
It becomes a bit of a hassle to achieve something like the following:
auto conn_h = conn.release();
{
sockpp::socket sd_sock(conn_h);
// We end up with writing on client side explicitly,
// so the receiver's aware an icoming data stream is over.
if (!sd_sock.shutdown(SHUT_WR))
throw io::transfer_error::from_sock(sd_sock);
}
sockpp::stream_socket rd_sock(conn_h);
// read the response through rd_sock here
// ...
Does partial shutdown modes (SHUT_RD, SHUT_WR) should necessarily release the socket handle?
It becomes a bit of a hassle to achieve something like the following: