I tried to view the source, but I can not move this part of the template code. Basically: this is what the documentation says (for close() ):
Remarks For portable behaviour with respect to graceful closure of a connected socket, call shutdown() before closing the socket.
I can do it manually, but if possible, it would be nice to rely on RAII.
So, if I have a socket that goes out of scope, do I need to call shutdown() and close() on it, or will it be done automatically?
source share