Go to the previous, next section.

shutdown

SYNOPSIS

int shutdown(int s, int how);

PARAMETERS

s: [in] the socket to shutdown.

how: [in] how to do it.

DESCRIPTION

Terminates the communication on a socket. The possible values for how are:

0
the socket can no longer receive.

1
the socket can no longer send.

2
the socket can no longer receive or send.

RETURN VALUE

On success zero is returned. On error, -1 is returned and errno is set to one of the following values:

Go to the previous, next section.