SHUTDOWN
Section: Linux Programmer's Manual (2)
Updated: 24 July 1993
Index
Return to Main Contents
NAME
shutdown - shut down part of a full-duplex connection
SYNOPSIS
#include <sys/socket.h>
int shutdown(int s, int how);
DESCRIPTION
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, further receives will be disallowed. If
how
is 1, further sends will be disallowed. If
how
is 2, further sends and receives will be disallowed.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and
errno
is set appropriately.
ERRORS
- EBADF
-
-
S
is not a valid descriptor.
- ENOTSOCK
-
S
is a file, not a socket.
- ENOTCONN
-
The specified socket is not connected.
HISTORY
The
shutdown
function call appeared in BSD 4.2.
SEE ALSO
connect(2), socket(2)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- HISTORY
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 12:24:48 GMT, March 22, 2025