NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ATTRIBUTES | SEE ALSO
#include <sys/types.h> #include <sys/socket.h>int shutdown(int s, int how);
POSIX_SOCKETS
The shutdown call causes all or part of a full-duplex connection on the socket associated with s to be shut down. If how is 0, subsequent receives will be disallowed. If how is 1, subsequent sends will be disallowed. If how is 2, subsequent sends and receives will be disallowed.
Upon successful completion, shutdown returns 0; otherwise it returns -1 and sets errno to indicate one of the following error conditions:
s is not a valid descriptor.
s is a file, not a socket.
The specified socket is not connected.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ATTRIBUTES | SEE ALSO