*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> shutdown (2)              



NAME    [Toc]    [Back]

     shutdown - shut down part of a full-duplex connection

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/socket.h>

     shutdown(int s, int how);

DESCRIPTION    [Toc]    [Back]

     The shutdown() call causes all or part of a full-duplex connection on the
     socket associated with s to be shut down.  The how argument specifies
     which part of the connection will be shut down.  Permissible values are:

           SHUT_RD      further receives will be disallowed.

           SHUT_WR      further sends will be disallowed.

           SHUT_RDWR    further sends and receives will be disallowed.

RETURN VALUES    [Toc]    [Back]

     A 0 is returned if the call succeeds, -1 if it fails.

ERRORS    [Toc]    [Back]

     The call succeeds unless:

     [EBADF]            s is not a valid descriptor.

     [EINVAL]           The how argument is invalid.

     [ENOTCONN]         The specified socket is not connected.

     [ENOTSOCK]         s is a file, not a socket.

SEE ALSO    [Toc]    [Back]

     connect(2), socket(2)

HISTORY    [Toc]    [Back]

     The shutdown() function call appeared in 4.2BSD.

BSD                              June 4, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
SSL_shutdown NetBSD shut down a TLS/SSL connection
SSL_shutdown OpenBSD shut down a TLS/SSL connection
SSL_shutdown Tru64 Shut down a TLS/SSL connection
shutdown HP-UX shut down a socket
xlv_shutdown IRIX shut down XLV volumes
shutdown Tru64 Shut down socket send and receive operations
full Linux always full device
ftpshut HP-UX create shutdown message file to shut down the ftp servers at a given time
photo IRIX Full-color images
endfullscrn IRIX ends full-screen mode
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service