Index of Section 2 Manual Pages

Interix / SUAshutdown.2Interix / SUA

shutdown(2)                                                 shutdown(2)

  shutdown()

  NAME

    shutdown() - shut down part of a full-duplex connection

  SYNOPSIS

    #include 

    int shutdown (int socket, int how)

  DESCRIPTION

    The shutdown(2) call causes all or part of a full-duplex connection on the
    socket identifed by socket to be shut down. The how argument specifies the
    type of shutdown, and must be one of the following values:

    SHUT_RD
        Disables further receive operations.

    SHUT_WR
        Disables further send operations.

    SHUT_RDWR
        Disables further send and receive operations.

  RETURN VALUES

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

  ERRORS

    The call succeeds unless:

    [EBADF]
        The socket argument is not a valid descriptor.

    [ENOTSOCK]
        The socket argument specifies a file, not a socket.

    [ENOTCONN]
        The specified socket is not connected.

  SEE ALSO

    connect(2)

    socket(2)

  USAGE NOTES

    The shutdown function is thread safe.

    The shutdown function is async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA