Shuts down all or part of a full-duplex connection.
int shutdown( int s, int how );
s
how
Value | Mnemonic | Description |
---|---|---|
0 |
SHUT_RD |
Disallow further receives. |
1 |
SHUT_WR |
Disallow further sends. |
2 |
SHUT_RDWR |
Disallow further receives and sends. |
This call closes the socket when you disallow both receive and send functions. This can occur with a how of 2, or with subsequent calls specifying a how of 1 and a how of 0.
0
(zero)
-1
and the function sets errno to one of these values:
EBADF |
Invalid file descriptor or file not opened for writing. |
ENOSPC |
No space left on device. |
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/sys/socket.h | sys/types.h sys/socket.h |
netiff3m.lib |