BSD 4_4 development
[unix-history] / usr / share / man / cat2 / shutdown.0
SHUTDOWN(2) BSD Programmer's Manual SHUTDOWN(2)
N\bNA\bAM\bME\bE
s\bsh\bhu\but\btd\bdo\bow\bwn\bn - shut down part of a full-duplex connection
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/s\bso\boc\bck\bke\bet\bt.\b.h\bh>\b>
_\bi_\bn_\bt
s\bsh\bhu\but\btd\bdo\bow\bwn\bn(_\bi_\bn_\bt _\bs, _\bi_\bn_\bt _\bh_\bo_\bw);
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The s\bsh\bhu\but\btd\bdo\bow\bwn\bn() call causes all or part of a full-duplex connection on the
socket associated with _\bs to be shut down. If _\bh_\bo_\bw is 0, further receives
will be disallowed. If _\bh_\bo_\bw is 1, further sends will be disallowed. If
_\bh_\bo_\bw is 2, further sends and receives will be disallowed.
D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
A 0 is returned if the call succeeds, -1 if it fails.
E\bER\bRR\bRO\bOR\bRS\bS
The call succeeds unless:
[EBADF] _\bS is not a valid descriptor.
[ENOTSOCK] _\bS is a file, not a socket.
[ENOTCONN] The specified socket is not connected.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
connect(2), socket(2)
H\bHI\bIS\bST\bTO\bOR\bRY\bY
The s\bsh\bhu\but\btd\bdo\bow\bwn\bn function call appeared in 4.2BSD.
4.2 Berkeley Distribution June 4, 1993 1