- SHUT_RD: further receptions will be disallowed, - SHUT_WR: further transmissions will be disallowed, - SHUT_RDWR: further receptions and transmissions will be disal‐ lowed.
0 on success or -1 on failure. On failure errno is set appropriately.
Errors: EBADF The argument sockfd is not a valid descriptor.
ENOTSOCK The argument sockfd is not a socket.
ENOTCONN The specified socket is not connected.
The shutdown() call causes all or part of a full-duplex connection on the socket to be shut down.