1shutdown(3SOCKET)          Sockets Library Functions         shutdown(3SOCKET)
2
3
4

NAME

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

SYNOPSIS

9       cc [ flag... ] file... -lsocket  -lnsl  [ library... ]
10       #include <sys/socket.h>
11
12       int shutdown(int s, int how);
13
14

DESCRIPTION

16       The  shutdown() call shuts down all or part of a full-duplex connection
17       on the socket associated with s. If how is  SHUT_RD,  further  receives
18       are disallowed. If how is SHUT_WR, further sends are disallowed. If how
19       is SHUT_RDWR, further sends and receives are disallowed.
20
21
22       The how values should be defined constants.
23

RETURN VALUES

25       0 is returned if the call succeeds.
26
27
28       −1 is returned if the call fails.
29

ERRORS

31       The call succeeds unless one of the following conditions exists:
32
33       EBADF       The s value is not a valid file descriptor.
34
35
36       ENOMEM      Insufficient user memory is available for the operation  to
37                   complete.
38
39
40       ENOSR       Insufficient STREAMS resources are available for the opera‐
41                   tion to complete.
42
43
44       ENOTCONN    The specified socket is not connected.
45
46
47       ENOTSOCK    The s value is not a socket.
48
49

ATTRIBUTES

51       See attributes(5) for descriptions of the following attributes:
52
53
54
55
56       ┌─────────────────────────────┬─────────────────────────────┐
57       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │MT-Level                     │Safe                         │
60       └─────────────────────────────┴─────────────────────────────┘
61

SEE ALSO

63       connect(3SOCKET), socket(3SOCKET), socket.h(3HEAD), attributes(5)
64
65
66
67SunOS 5.11                        31 Jan 2005                shutdown(3SOCKET)
Impressum