DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

shutdown(SSC)


shutdown -- shut down part of a full-duplex connection

Synopsis

cc [options] file -lsocket -lnsl
#include <sys/socket.h>

int shutdown(int socket, int how);

Description

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. If how is SHUT_RDWR, then further sends and receives will be disallowed.

Files

/usr/lib/locale/locale/LC_MESSAGES/uxnsl

Return values

A 0 is returned if the call succeeds. Otherwise, -1 is returned and errno is set to indicate the error.

Errors

The call fails if how is invalid or if:

EBADF
socket is not a valid descriptor.

EINVAL
The value of how is invalid.

ENOBUFS
System resources were insufficient to perform the operation.

ENOMEM
There was insufficient user memory available for the operation to complete.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

ENOTCONN
The specified socket is not connected.

ENOTSOCK
socket is a file, not a socket.

References

connect(SSC), socket(SSC)

Notices

The how values should be defined constants.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005