Ends all or part of a full-duplex connection.
#include <sys/socket.h> int shutdown ( int s, int how);
(IN) Specifies the socket file handle on which the connection is to be ended.
(IN) Specifies the extent to which the connection is to be ended with one of the following flags:
If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:
The shutdown function ends all or part of a full-duplex connection on the socket associated with s.
If how is 0 (disable receive), you cannot subsequently call recv. If how is 1 (disable send), you cannot call send again. If how is 2 (disable send and receive), you cannot subsequently call send or recv.