[Previous] [Contents] [Next]

shutdown()

Shut down part of a full-duplex connection

Synopsis:

#include <sys/socket.h>

int shutdown( int s, 
              int how );

Library:

libsocket

Description:

The shutdown() call shuts down all or part of a full-duplex connection on the socket associated with s.

If how is: The TCP/IP manager won't allow:
0 Further receives
1 Further sends
2 Further sends and receives

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EBADF
Invalid descriptor s.

Classification:

Standard Unix, POSIX 1003.1g (draft)

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

close(), connect(), socket()


[Previous] [Contents] [Next]