Library /sys$common/syshlp/HELPLIB.HLB  —  TCPIP Services, Programming Interfaces, Socket API Functions, shutdown()
    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 direction at a time rather than all at once. You can use the
    shutdown() function to shut down one direction in a full-duplex
    (bidirectional) connection.
    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 Help