DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

shutdown(SSC-osr5)


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-osr5), socket(SSC-osr5)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005