shutdown()

The socket call shuts down all or part of a full-duplex connection.

Syntax

#include <sys\socket.h>
int shutdown(s, howto)
int s;
int howto;

Parameters

s

howto

Description

This call shuts down all or part of a full-duplex connection. Since data flows in one direction are independent of data flows in the other direction, the shutdown call allows you to independently stop data flow in either direction or all data flows with one API call. For example, you may want to stop the sender(s) from sending data to you, but you still want to send data.

Using the shutdown() call is optional.

The howto parameter sets the condition for shutting down the connection to socket s. It can be set to one of the following: