1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="TCP/IP Library Reference"
23 HREF="tcpip-library-reference.html"><LINK
26 HREF="net-common-tcpip-manpages-send.html"><LINK
29 HREF="net-common-tcpip-manpages-socket.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="net-common-tcpip-manpages-send.html"
65 >Chapter 38. TCP/IP Library Reference</TD
71 HREF="net-common-tcpip-manpages-socket.html"
85 NAME="NET-COMMON-TCPIP-MANPAGES-SHUTDOWN">shutdown</H1
94 >SHUTDOWN(2) System Calls Manual SHUTDOWN(2)
97 shutdown - shut down part of a full-duplex connection
100 #include <sys/types.h>
101 #include <sys/socket.h>
104 shutdown(int s, int how);
107 The shutdown() call causes all or part of a full-duplex connection on the
108 socket associated with s to be shut down. If how is SHUT_RD, further
109 receives will be disallowed. If how is SHUT_WR, further sends will be
110 disallowed. If how is SHUT_RDWR, further sends and receives will be dis-
114 A 0 is returned if the call succeeds, -1 if it fails.
117 The call succeeds unless:
119 [EINVAL] how is not SHUT_RD, SHUT_WR, or SHUT_RDWR.
121 [EBADF] s is not a valid descriptor.
123 [ENOTSOCK] s is a file, not a socket.
125 [ENOTCONN] The specified socket is not connected.
128 connect(2), socket(2)
131 The shutdown() function call appeared in 4.2BSD. The how arguments used
132 to be simply 0, 1, and 2, but now have named values as specified by
133 X/Open Portability Guide Issue 4 (``XPG4'').
146 SUMMARY="Footer navigation table"
157 HREF="net-common-tcpip-manpages-send.html"
175 HREF="net-common-tcpip-manpages-socket.html"
191 HREF="tcpip-library-reference.html"