The SockShutDown() call shuts down all, or part, of a full duplex connection. This call is optional.


>>--SockShutDown(socket, howto)------------------------------------------><



is the socket descriptor.


is the condition of the shutdown of socket.

Because data flows in different directions are independent of each other, SockShutDown() allows you to independently stop data flows in one direction, or all data flows, with one API call. For example, you can enable yourself to send data but disable other senders to send data to you.

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


No more data can be received on socket.


No more output is allowed on socket.


No more data can be sent or received on socket.

Return values:

The value 0 indicates successful execution of the call. The value -1 indicates an error. You can get the specific error code SockSock_Errno() or SockPSock_Errno(). Possible values are:


socket is not a valid socket descriptor.


howto was not set to a valid value.

Note: SockShutDown() interfaces with the C function shutdown().