Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
When you have finished using a socket, you can simply close its
file descriptor with
close; see 13.1 Opening and Closing Files.
If there is still data waiting to be transmitted over the connection,
close tries to complete this transmission. You
can control this behavior using the
SO_LINGER socket option to
specify a timeout period; see 16.12 Socket Options.
You can also shut down only reception or transmission on a
connection by calling
shutdown, which is declared in
shutdownfunction shuts down the connection of socket socket. The argument how specifies what action to perform:
The return value is
0 on success and
-1 on failure. The
errno error conditions are defined for this function:
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|