cs::Net::TCP - handle TCP network connections
use cs::Net::TCP;
This module supplied facilities for dealing with TCP stream connections.
The follow flag constants should be ORed together to select the mode for the Serve method.
Fork a subprocess to handle connections.
Return after handling a single connection.
Wait for the forked child.
Fork twice so children are orphans to avoid zombies when children need not be waited for. This flag implies F_FORK.
Connect to the specified port on the specified host using the specified localport at this end. Normally localport is omitted an an arbitrary free local port is chosen. Returns the filehandle of the new socket.
Listen for connection on the specified port. If omitted, port defaults to 0 and an arbitrary free port is chosen to listen on. Returns the file handle of the new socket.
Listen on the named port. If omitted, port defaults to 0, which should choose a free port.
Connect to the port on the specified host using the local localport at this end. Normally localport is omitted, and an arbitrary free local port number is allocated.
Port()
Return the local port number of this socket.
Cameron Simpson <cs@zip.com.au>