shut down part of a full-duplex connection
cc [options] file -lsocket -lnsl
int shutdown(int socket, int how);
The shutdown call shuts down all or part of a full-duplex
connection on the socket associated with socket.
If how is SHUT_RD, then further receives will be disallowed.
If how is SHUT_WR, then further sends will be disallowed.
is SHUT_RDWR, then further sends and receives will be disallowed.
A 0 is returned if the call succeeds.
Otherwise, -1 is returned and errno is set to indicate
The call fails if how is invalid or if:
socket is not a valid descriptor.
The value of how is invalid.
System resources were insufficient to perform the operation.
There was insufficient user memory available for the operation to complete.
There were insufficient STREAMS
resources available for the operation to complete.
The specified socket is not connected.
socket is a file, not a socket.
The how values should be defined constants.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004