|SHUTDOWN(3P)||POSIX Programmer's Manual||SHUTDOWN(3P)|
int shutdown(int socket, int how);
The shutdown() function takes the following arguments:
- Specifies the file descriptor of the socket.
- Specifies the type of shutdown. The values are as follows:
- Disables further receive operations.
- Disables further send operations.
- Disables further send and receive operations.
The shutdown() function disables subsequent send and/or receive operations on a socket, depending on the value of the how argument.
- The socket argument is not a valid file descriptor.
- The how argument is invalid.
- The socket is not connected.
- The socket argument does not refer to a socket.
The shutdown() function may fail if:
- Insufficient resources were available in the system to perform the operation.
The following sections are informative.
The Base Definitions volume of POSIX.1‐2017, <sys_socket.h>
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
|2017||IEEE/The Open Group|