shutdown(SSC)
shutdown --
shut down part of a full-duplex connection
Syntax
cc ... -lsocket
int shutdown(s, how)
int s, how;
Description
The
shutdown( )
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.
Return values
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.
Diagnostics
The call fails if:
[EBADF]-
The s argument is not a valid descriptor.
[ENOTSOCK]-
The s argument points to a file, not a socket.
[ENOTCONN]-
The specified socket is not connected.
See also
connect(SSC),
socket(SSC)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003