plumbing::endpoint_listener_chargen Class Reference

#include <chargen.h>

Inheritance diagram for plumbing::endpoint_listener_chargen:
plumbing::endpoint_listener plumbing::endpoint

Public Member Functions

virtual ~endpoint_listener_chargen ()

Static Public Member Functions

static pointer create (reactor &svc, const std::string &port_number="", int repeat_count=-1)

Protected Member Functions

int get_default_port () const
endpoint::pointer endpoint_factory (int fd, void *adr, int adrlen)

Private Member Functions

 endpoint_listener_chargen (reactor &svc, const std::string &port_number, int repeat_count=-1)
 endpoint_listener_chargen ()
 endpoint_listener_chargen (const endpoint_listener_chargen &rhs)
endpoint_listener_chargenoperator= (const endpoint_listener_chargen &rhs)

Detailed Description

The plumbing::endpoint_listener_chargen class is used to represent a socket that listens for connections, and spawns plumbing::endpoint_chargen objects to serve those new connections.

Definition at line 31 of file chargen.h.


Constructor & Destructor Documentation

plumbing::endpoint_listener_chargen::~endpoint_listener_chargen (  )  [virtual]

The destructor.

Definition at line 22 of file chargen.cc.

plumbing::endpoint_listener_chargen::endpoint_listener_chargen ( reactor svc,
const std::string &  port_number,
int  repeat_count = -1 
) [private]

The constructor. It is private on purpse, use the create class method instead.

Parameters:
svc The reactor to manage all new connections.
port_number The numer of the port to use, or the empty string if it should use the well known port.
repeat_count The number of time to spawn servers before self terminating. Use -1 to mean "infinity".

Definition at line 27 of file chargen.cc.

plumbing::endpoint_listener_chargen::endpoint_listener_chargen (  )  [private]

The default constructor. Do not use.

plumbing::endpoint_listener_chargen::endpoint_listener_chargen ( const endpoint_listener_chargen rhs  )  [private]

The copy constructor. Do not use.

Parameters:
rhs The right hand side of the initialisation.

Member Function Documentation

plumbing::endpoint::pointer plumbing::endpoint_listener_chargen::create ( reactor svc,
const std::string &  port_number = "",
int  repeat_count = -1 
) [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
svc The reactor to manage all new connections.
port_number The numer of the port to use, or the empty string if it should use the well known port.
repeat_count The number of time to spawn servers before self terminating. Use -1 to mean "infinity".

Definition at line 35 of file chargen.cc.

plumbing::endpoint::pointer plumbing::endpoint_listener_chargen::endpoint_factory ( int  fd,
void *  adr,
int  adrlen 
) [protected, virtual]

The endpoint_factory method is call in response to a successful connection by a client.

Parameters:
fd The file descriptor of the new connnection
adr The address data structure returned by accept
adrlen The length of the address data structure returned by accept
Returns:
A dynamically allocated endpoint instance.

Implements plumbing::endpoint_listener.

Definition at line 56 of file chargen.cc.

int plumbing::endpoint_listener_chargen::get_default_port (  )  const [protected, virtual]

The get_default_port method is used to obtain the port number this reactor will listen on, if not port is specified in the configuration file. Each drived class must supply its own default port.

Implements plumbing::endpoint_listener.

Definition at line 47 of file chargen.cc.

endpoint_listener_chargen& plumbing::endpoint_listener_chargen::operator= ( const endpoint_listener_chargen rhs  )  [private]

The assignment operator. Do not use.

Parameters:
rhs The rights hand side of the assignment.

The documentation for this class was generated from the following files:
Generated on Thu Sep 16 14:51:27 2010 for Plumbing by  doxygen 1.6.3