NAME
Win32::ProcFarm::Port - manages access to the TCP port for ProcFarm system
SYNOPSIS
use Win32::ProcFarm::Port;
$port_obj = Win32::ProcFarm::Port->new(9000, 1);
print $port_obj->get_port_num;
$socket = $port_obj->get_next_connection;
DESCRIPTION
Installation instructions
This installs with MakeMaker as part of Win32::ProcFarm.
To install via MakeMaker, it's the usual procedure - download from CPAN, extract, type "perl Makefile.PL", "nmake" then "nmake install". Don't do an "nmake test" because the I haven't written a test suite yet.
METHODS
new
The new
method creates a new Win32::ProcFarm::Port
object (fancy that!). It takes two parameters - the first is the port number to listen on, and the second is the number of listeners to create - this will specify the number of "hold lines" for the port object.
get_port_num
This returns the port number passed in the new
method.
get_listeners
This returns the number of listeners created in the new
method.
get_next_connection
This accepts an inbound connection and returns the socket object. If the inbound connection is not from 127.0.0.1, the method calls die
as this indicates an attempt to hack the system by an external host.