1SHUTDOWN(2) System Calls Manual SHUTDOWN(2)
2
3
4
6 shutdown - shut down part of a full-duplex connection
7
9 shutdown(s, how)
10 int s, how;
11
13 The shutdown call causes all or part of a full-duplex connection on the
14 socket associated with s to be shut down. If how is 0, then further
15 receives will be disallowed. If how is 1, then further sends will be
16 disallowed. If how is 2, then further sends and receives will be dis‐
17 allowed.
18
20 A 0 is returned if the call succeeds, -1 if it fails.
21
23 The call succeeds unless:
24
25 [EBADF] S is not a valid descriptor.
26
27 [ENOTSOCK] S is a file, not a socket.
28
29 [ENOTCONN] The specified socket is not connected.
30
32 connect(2), socket(2)
33
34
35
364.2 Berkeley Distribution May 15, 1985 SHUTDOWN(2)