Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shutdown.xs(3N-xs) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

read(2)

write(2)

select(3C)

getsockopt(3N-xs)

recv(3N-xs)

recvfrom(3N-xs)

recvmsg(3N-xs)

send(3N-xs)

sendto(3N-xs)

setsockopt(3N-xs)

socket(3N-xs)

shutdown(3N-xs)               (X/OPEN SOCKETS)              shutdown(3N-xs)

NAME
     shutdown - shut down socket send and receive operations

SYNOPSIS
     cc [flag ...] file ... -lxnet [library ...]

     #include <sys/socket.h>

     int shutdown(int socket, int how);

DESCRIPTION
     The shutdown function disables subsequent send and/or receive opera-
     tions on a socket, depending on the value of the how argument.

     socket          Specifies the file descriptor of the socket.

     how             Specifies the type of shutdown. The values are as fol-
                     lows:

                     SHUTRD      Disables further receive operations.

                     SHUTWR      Disables further send operations.

                     SHUTRDWR    Disables further send and receive opera-
                                  tions.

RETURN VALUE
     Upon successful completion, shutdown returns 0. Otherwise, -1 is
     returned and errno is set to indicate the error.

ERRORS
     The shutdown function will fail if:

     EBADF           The socket argument is not a valid file descriptor.

     ENOTCONN        The socket is not connected.

     ENOTSOCK        The socket argument does not refer to a socket.

     EINVAL          The how argument is invalid.

     The shutdown function may fail if:

     ENOBUFS         The resources available in the system were not suffi-
                     cient to perform the operation.

     ENOSR           The STREAMS resources available were not sufficient to
                     complete the operation.







Page 1                       Reliant UNIX 5.44                Printed 11/98

shutdown(3N-xs)               (X/OPEN SOCKETS)              shutdown(3N-xs)

SEE ALSO
     read(2), write(2), select(3C), getsockopt(3N-xs), recv(3N-xs),
     recvfrom(3N-xs), recvmsg(3N-xs), send(3N-xs), sendto(3N-xs),
     setsockopt(3N-xs), socket(3N-xs).


















































Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026