shutdown.2 (2010 09)

s
shutdown(2) shutdown(2)
SHUT_RD behaves the same for SCTP as TCP. The purpose of SCTP
SHUT_WR is to close the SCTP asso-
ciation while still leaving the socket descriptor open, so that the caller can receive back any data SCTP
was unable to deliver.
Note: SCTP is only available when the SCTP optional bundle is installed.
X/Open Sockets Compilation Environment
See xopen_networking(7).
RETURN VALUE
Upon successful completion,
shutdown() returns 0; otherwise it returns 1 and
errno is set to indi-
cate the error.
ERRORS
shutdown() fails if any of the following conditions are encountered:
[EBADF] s is not a valid file descriptor.
[ENOPROTOOPT] The remote system or an intermediate system in the communications path does
not support a protocol option sent by the local system. This option may have been
set using a
getsockopt or setsockopt() call, or set as a system parame-
ter.
[ENOTSOCK] s is a valid file descriptor, but it is not a socket.
[EINVAL]
HP-UX BSD Sockets only. The specified socket is not connected.
[ENOTCONN]
X/Open Sockets only. The specified socket is not connected.
[EINVAL]
X/Open Sockets only. The how argument is invalid.
WARNINGS
Linking binary objects compiled to X/Open Sockets specification and binary objects compiled to HP-UX
BSD Sockets specification to the same executable may result in unexpected behavior, including applica-
tion abnormal termination and unexpected socket errors. See xopen_networking(7) for details and
remedy.
FUTURE DIRECTION
Currently, the default behavior is the HP-UX BSD Sockets; however, it might be changed to X/Open
Sockets in a future release. At that time, any HP-UX BSD Sockets behavior that is incompatible with
X/Open Sockets might be obsoleted. Applications that conform to the X/Open specification now will
avoid migration problems (see xopen_networking(7)).
AUTHOR
shutdown() was developed by HP and the University of California, Berkeley.
SEE ALSO
close(2), connect(2), socket(2), sctp(7), xopen_networking(7).
STANDARDS CONFORMANCE
shutdown(): XPG4, UNIX 95, UNIX 03
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010