shut down part of a full-duplex connection
cc ... -lsocket
int shutdown(s, how)
int s, how;
call causes all or part of a full-duplex connection on
the socket associated with s to be shut down.
If how is 0, then further receives will be disallowed.
If how is 1, then further sends will be disallowed.
If how is 2, then further sends and receives will be disallowed.
A return value of zero indicates that the call succeeded.
A return value of -1 indicates that an error occurred, and in this
case an error code is stored in the global variable errno.
The call fails if:
The s argument is not a valid descriptor.
The s argument points to a file, not a socket.
The specified socket is not connected.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003