SHUTDOWN(2)
NAME
shutdown − shut down part of a full-duplex connection
USAGE
shutdown(s, how)
int s, how;
DESCRIPTION
The shutdown call closes down all or part of a full-duplex connection on the socket associated with s. If how is zero, further receives are not allowed. If how is 1, further sends are not allowed. If how is 2, further sends and receives are not allowed.
DIAGNOSTICS
A zero is returned if the call succeeds, −1 if it fails.
ERRORS
The call succeeds unless:
[EBADF] S is not a valid descriptor.
[ENOTSOCK] S is a file, not a socket.
[ENOTCONN] The specified socket is not connected.