SYNOPSIS
DESCRIPTION
This call causes all or part of a full-duplex connection to be shut down. If how is "rd", receiving from the socket is shut down, if it is "wr", sending to the socket is shut down and if it is "rdwr", the complete connection is shut down. The default is "rdwr".
When a connection has been shut down for reading, then further read attempt will first return any data that is still in the buffers, then signal an end-of-file condition.
When a connection has been shut down for writing, then further write attempts will fail. The peer of the connection will see this as a read shutdown, i.e. it will see an end-of-file once all buffered data has been read.
All shutdowns are final. The connection cannot be re-opened once it has been shutdown.