DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

shutdown(3sock)


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(3sock), socket(3sock)

Notices

The how values should be defined constants.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004