HP Rp7410 BSD Sockets Interface Programmer's Guide - Page 79
When to Shut Down a Socket
View all HP Rp7410 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 79 highlights
Advanced Topics for Stream Sockets Using Shutdown Parameter Description of Contents s socket descriptor how number that indicates the type of shutdown INPUT Value socket descriptor of socket to be shut down 0, 1 or 2 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 79
Chapter 3
79
Advanced Topics for Stream Sockets
Using 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
.
Parameter
Description of
Contents
INPUT Value
s
socket descriptor
socket descriptor of socket
to be shut down
how
number that indicates
the type of shutdown
0, 1 or 2