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

  man pages->OpenBSD man pages -> shutdown (2)              
Title
Content
Arch
Section
 

SHUTDOWN(2)

Contents


NAME    [Toc]    [Back]

     shutdown - shut down part of a full-duplex connection

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <sys/socket.h>

     int
     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.   If how is
SHUT_RD, further receives
 will be disallowed.  If how is SHUT_WR, further sends
will be disallowed.
   If  how  is 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:

     [EINVAL]      how is not SHUT_RD, SHUT_WR, or SHUT_RDWR.

     [EBADF]       s is not a valid descriptor.

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

     [ENOTCONN]    The specified socket is not connected.

SEE ALSO    [Toc]    [Back]

      
      
     connect(2), socket(2)

HISTORY    [Toc]    [Back]

     The shutdown() function call appeared in  4.2BSD.   The  how
arguments used
     to be simply 0, 1, and 2, but now have named values as specified by
     X/Open Portability Guide Issue 4 (``XPG4'').

OpenBSD      3.6                           June      4,      1993
[ 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