What exactly does the destructor of boost::asio::ip::tcp::socket
do? I can\'t tell, even after scouring Boost docs and source code, if I need to use
The answers have skipped over the issue of shutdown(). From the close() documentation, "For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket".
If deleting the socket does an implicit close, it seems that a call to shutdown() is still recommended before deleting it.