shutdown()

shutdown full-duplex connection on socket 

Function


SYNOPSIS

#include <sys/socket.h>

int shutdown(int s, int how);


DESCRIPTION

The shutdown() function shuts down all or part of a full-duplex connection on the socket associated with s. If how is SHUT_RD, then further receives are disallowed. If how is SHUT_WR, then further sends are disallowed. If how is SHUT_RDWR, then further sends and receives are disallowed.


PARAMETERS

s 

Is the socket descriptor to shut down.

how 

Specifies the type of shutdown.


RETURN VALUES

Upon successful completion, shutdown() returns 0. Otherwise, -1 is returned and errno is set to one of the following:

EBADF 

The socket argument is not a valid file descriptor.

EINVAL 

The how argument is invalid.

ENOTCONN 

The socket is not connected. (connection oriented sockets only.)

ENOTSOCK 

The s argument does not refer to a socket.


CONFORMANCE

UNIX 98, with exceptions.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

The NuTCRACKER Platform supports all the address families that WinSock 2.0 supports.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
getsockopt(), read(), recv(), recvfrom(), recvmsg(), select(), send(), sendmsg(), sendto(), setsockopt(), socket(), socketpair(), write()


PTC MKS Toolkit 10.4 Documentation Build 39.