Commit | Line | Data |
---|---|---|
6078a027 KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
d8542350 | 5 | .\" @(#)shutdown.2 6.1 (Berkeley) %G% |
6078a027 | 6 | .\" |
d8542350 | 7 | .TH SHUTDOWN 2 "" |
6078a027 KM |
8 | .UC 5 |
9 | .SH NAME | |
10 | shutdown \- shut down part of a full-duplex connection | |
11 | .SH SYNOPSIS | |
12 | .nf | |
13 | .ft B | |
14 | shutdown(s, how) | |
15 | int s, how; | |
16 | .fi | |
17 | .SH DESCRIPTION | |
18 | The | |
19 | .I shutdown | |
20 | call causes all or part of a full-duplex connection on | |
21 | the socket associated with | |
22 | .I s | |
23 | to be shut down. | |
24 | If \fIhow\fP is 0, then further receives will be disallowed. | |
25 | If \fIhow\fP is 1, then further sends will be disallowed. | |
26 | If \fIhow\fP is 2, then further sends and receives will be disallowed. | |
27 | .SH DIAGNOSTICS | |
28 | A 0 is returned if the call succeeds, \-1 if it fails. | |
29 | .SH ERRORS | |
30 | The call succeeds unless: | |
31 | .TP 15 | |
32 | [EBADF] | |
33 | .I S | |
34 | is not a valid descriptor. | |
35 | .TP 15 | |
36 | [ENOTSOCK] | |
37 | .I S | |
38 | is a file, not a socket. | |
39 | .TP 15 | |
40 | [ENOTCONN] | |
41 | The specified socket is not connected. | |
42 | .SH "SEE ALSO" | |
43 | connect(2), socket(2) |