1SHUTDOWN(2)                Linux Programmer's Manual               SHUTDOWN(2)
2
3
4

NAME

6       shutdown - shut down part of a full-duplex connection
7

SYNOPSIS

9       #include <sys/socket.h>
10
11       int shutdown(int s, int how);
12

DESCRIPTION

14       The  shutdown()  call causes all or part of a full-duplex connection on
15       the socket associated with s to be shut down.  If how is SHUT_RD,  fur‐
16       ther  receptions will be disallowed.  If how is SHUT_WR, further trans‐
17       missions will be disallowed.  If how is SHUT_RDWR,  further  receptions
18       and transmissions will be disallowed.
19

RETURN VALUE

21       On  success,  zero is returned.  On error, -1 is returned, and errno is
22       set appropriately.
23

ERRORS

25       EBADF  s is not a valid descriptor.
26
27       ENOTCONN
28              The specified socket is not connected.
29
30       ENOTSOCK
31              s is a file, not a socket.
32

NOTES

34       The constants SHUT_RD, SHUT_WR, SHUT_RDWR  have  the  value  0,  1,  2,
35       respectively, and are defined in <sys/socket.h> since glibc-2.1.91.
36

CONFORMING TO

38       POSIX.1-2001,  4.4BSD  (the  shutdown() function call first appeared in
39       4.2BSD).
40

SEE ALSO

42       connect(2), socket(2)
43
44
45
46BSD Man Page                      1993-07-24                       SHUTDOWN(2)
Impressum