plumbing::endpoint_listener_daytime Class Reference

#include <daytime.h>

Inheritance diagram for plumbing::endpoint_listener_daytime:
plumbing::endpoint_listener plumbing::endpoint

Public Member Functions

virtual ~endpoint_listener_daytime ()

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_daytime (reactor &svc, const std::string &port_number, int repeat_count=-1)
 endpoint_listener_daytime ()
 endpoint_listener_daytime (const endpoint_listener_daytime &rhs)
endpoint_listener_daytimeoperator= (const endpoint_listener_daytime &rhs)

Detailed Description

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

Definition at line 30 of file daytime.h.


Constructor & Destructor Documentation

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

The destructor.

Definition at line 22 of file daytime.cc.

plumbing::endpoint_listener_daytime::endpoint_listener_daytime ( 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 daytime.cc.

plumbing::endpoint_listener_daytime::endpoint_listener_daytime (  )  [private]

The default constructor. Do not use.

plumbing::endpoint_listener_daytime::endpoint_listener_daytime ( const endpoint_listener_daytime 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_daytime::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 daytime.cc.

plumbing::endpoint::pointer plumbing::endpoint_listener_daytime::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 daytime.cc.

int plumbing::endpoint_listener_daytime::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 daytime.cc.

endpoint_listener_daytime& plumbing::endpoint_listener_daytime::operator= ( const endpoint_listener_daytime 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