SHUTDOWN(2)
NAME
shutdown − shut down part of a full-duplex socket 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. The how parameter may be any of:
0 no further receives are allowed.
1 no further sends are allowed.
2 no further sends or receives are allowed.
DIAGNOSTICS
A successful call returns zero. A failed call returns -1 and sets errno as indicated below.
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.