ffencoderd::HTTP::PREFORK Class Reference

List of all members.

Public Functions

void spawnChildren ()
string _guid ()
HTTP::Response errorPage (scalar type, scalar msg)
HTTP::Response mainPage ()
HTTP::Response exformPage ()
HTTP::Response fileUploadResponsePage (scalar filename, scalar length)
HTTP::Response statsPage ()
HTTP::Response newsFilePage ()
HTTP::Response procsPage ()
HTTP::Response wsdlPage ()
void keepTicking ()
void newChild ()
void REAPER ()
void init (scalar host, scalar port, scalar totalChildren, scalar childLifetime, scalar DATADIR, scalar UPLOADDIR)
void DESTROY ()
string product_tokens ()


Detailed Description

This class herits from SOAP::HTTP::Daemon creating a prefork http server accepting a large number of requests and large files attached to POST requests. The prefork is done through the spawnChildren and keepTicking functions, the server can serve many requests per child using all the same port.

Member Function Documentation

void ffencoderd::HTTP::PREFORK::spawnChildren (  ) 

Create $totalChildren processes

string ffencoderd::HTTP::PREFORK::_guid (  ) 

guid : create a unique identifier backportable

Returns:
string Unique identifier string

HTTP::Response ffencoderd::HTTP::PREFORK::errorPage ( scalar  type,
scalar  msg 
)

Generates a error page returning a response object directly

Parameters:
Integer $type Error type number
String $msg Error message string
Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::mainPage (  ) 

Main page

Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::exformPage (  ) 

Form example page

Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::fileUploadResponsePage ( scalar  filename,
scalar  length 
)

XML upload succesful page

Parameters:
string $filename Final file name for the uploaded file in the server
string $length String with the number of bytes as in the server filesystem
Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::statsPage (  ) 

XML stats document page

Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::newsFilePage (  ) 

Fetches and return as a HTTP::Response object the news from main site to show them on main page

Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::procsPage (  ) 

XML processes document page

Returns:
HTTP::Response

HTTP::Response ffencoderd::HTTP::PREFORK::wsdlPage (  ) 

Returns WSDL service defintion

Returns:
HTTP::Response

void ffencoderd::HTTP::PREFORK::keepTicking (  ) 

keepTicking - a never ending loop for the parent process which just monitors dying children and generates new ones

void ffencoderd::HTTP::PREFORK::newChild (  ) 

a forked child process that parses the different accessible paths and SOAP requests. This function does all the work for the server, parsing the requests done to them and serving the response for these requests.

void ffencoderd::HTTP::PREFORK::REAPER (  ) 

a reaper of dead children/zombies with exit codes to spare

void ffencoderd::HTTP::PREFORK::init ( scalar  host,
scalar  port,
scalar  totalChildren,
scalar  childLifetime,
scalar  DATADIR,
scalar  UPLOADDIR 
)

Start HTTP server, this will start $totalChildren children of this process

Parameters:
string $host Host IP address, it will serve only this address
int $port Port represented as integer where to run the http server
int $totalChildren Max number of spawned children processes of the http server (prefork)
int $childLifetime Max number of iterations to run each child process before dying
string $DATADIR Absolute path to dir where static data is found
string $UPLOADDIR Absolute path where user uploaded files are

void ffencoderd::HTTP::PREFORK::DESTROY (  ) 

Destroy all uneeded data after ending

string ffencoderd::HTTP::PREFORK::product_tokens (  ) 

Overload product_tokens from LWP


The documentation for this class was generated from the following file:

Generated on Mon May 12 16:23:47 2008 for ffencoderd framework API by  doxygen 1.5.5