VMS Help
TCPIP Services, Programming Interfaces, Sockets API, shutdown()

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Shuts down all or part of a bidirectional connection on a socket.
    This function does not allow further receives or sends, or both.
    The $QIO equivalent is the IO$_DEACCESS function with the IO$M_
    SHUTDOWN function modifier.
    Format
      #include  <socket.h>
      int shutdown  ( int s, int how) ;

  1 - Arguments

 s
    A socket descriptor that is in a connected state as a result of a
    previous call to either connect() or accept().
 how
    How the socket is to be shut down. Use one of the following
    values:
    0     Do not allow further calls to recv()  on the socket.
    1     Do not allow further calls to send()  on the socket.
    2     Do not allow further calls to both send()  and recv().

  2 - Description

    This function allows communications on a socket to be shut down
    one piece at a time rather than all at once. Use the shutdown()
    function to create unidirectional connections rather than the
    normal bidirectional (full-duplex) connections.
    Related Functions
    See also connect() and socket().

  3 - Return Values

    0                  Successful completion.
    -1                 Error; errno is set to indicate the error.

  4 - Errors

    EBADF              The socket descriptor is invalid.
    EINVAL             The how argument is invalid.
    ENOBUFS            The system has insufficient resources to
                       complete the call.
    ENOTCONN           The specified socket is not connected.
    ENOTSOCK           The socket descriptor is invalid.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.