Parameter
s
socket descriptor
how
number that indicates
the type of shutdown
Function result: 0 if shutdown is successful, –1 if failure occurs.
Example:
shutdown (s, 1);
When to Shut Down a Socket
Optionally, after the process has sent all messages and wants to indicate
that it is done sending, shut down the server or client process. Refer to
the shutdown(2) man page for more information on shutdown.
Chapter 3
Description of
Contents
Advanced Topics for Stream Sockets
Using Shutdown
INPUT Value
socket descriptor of socket
to be shut down
0, 1 or 2
79