1 SHUTDOWN(3C)             Standard C Library Functions             SHUTDOWN(3C)
   2 
   3 NAME
   4      shutdown - shut down part of a full-duplex connection
   5 
   6 LIBRARY
   7      Standard C Library (libc, -lc)
   8 
   9 SYNOPSIS
  10      #include <sys/socket.h>
  11 
  12      int
  13      shutdown(int s, int how);
  14 
  15 DESCRIPTION
  16      The shutdown() call shuts down all or part of a full-duplex connection on
  17      the socket associated with s.  If how is SHUT_RD, further receives are
  18      disallowed.  If how is SHUT_WR, further sends are disallowed.  If how is
  19      SHUT_RDWR, further sends and receives are disallowed.
  20 
  21      The how values should be defined constants.
  22 
  23 RETURN VALUES
  24      0 is returned if the call succeeds.  -1 is returned if the call fails.
  25 
  26 ERRORS
  27      The call succeeds unless one of the following conditions exists:
  28 
  29      [EBADF]            The s value is not a valid file descriptor.
  30 
  31      [ENOMEM]           Insufficient user memory is available for the
  32                         operation to complete.
  33 
  34      [ENOSR]            Insufficient STREAMS resources are available for the
  35                         operation to complete.
  36 
  37      [ENOTCONN]         The specified socket is not connected.
  38 
  39      [ENOTSOCK]         The s value is not a socket.
  40 
  41 MT-LEVEL
  42      Safe
  43 
  44 SEE ALSO
  45      connect(3C), socket(3C), socket.h(3HEAD), attributes(5)
  46 
  47 illumos                         August 2, 2018                         illumos