conexus logo

Conexus::Server Class Reference

#include <server.h>

Inheritance diagram for Conexus::Server:

Inheritance graph
[legend]

List of all members.

Public Types

typedef ConexusPointer< Serverpointer

Public Member Functions

virtual ~Server ()
virtual void start ()
virtual void start (bool use_dispatcher)
virtual void stop ()
virtual void set_responsiveness (long r)
 Sets the responsiveness to add_*, remove_* and stop commands in microseconds; lower is more responsive; larger is less responsive; default is 500000 microseconds (or 500 ms).
virtual long responsiveness ()
 Returns the server responsiveness level.
virtual bool is_running ()
sigc::signal< void, StartStopsignal_start_stop ()

Protected Member Functions

 Server ()
virtual void service_thread_main ()=0
virtual void pre_start ()
virtual void post_start ()
virtual void pre_stop ()
virtual void post_stop ()
virtual void emit ()=0

Protected Attributes

Glib::Thread * m_thread
bool m_terminate
bool m_running
Glib::Dispatcher * m_dispatcher
bool m_use_dispatcher
struct timeval m_timeval
sigc::signal< void, StartStopm_signal_start_stop

Private Member Functions

void service_thread_main_proxy ()
void emit_proxy ()


Detailed Description

Author:
Rick L Vinyard Jr

Member Typedef Documentation

typedef ConexusPointer<Server> Conexus::Server::pointer


Constructor & Destructor Documentation

Conexus::Server::Server (  )  [protected]

References m_timeval.

Conexus::Server::~Server (  )  [virtual]

References m_running, and stop().


Member Function Documentation

virtual void Conexus::Server::emit (  )  [protected, pure virtual]

Implemented in Conexus::EndpointServer.

Referenced by emit_proxy().

void Conexus::Server::emit_proxy (  )  [private]

References emit().

Referenced by start().

bool Conexus::Server::is_running (  )  [virtual]

References m_running.

virtual void Conexus::Server::post_start (  )  [inline, protected, virtual]

Referenced by start().

virtual void Conexus::Server::post_stop (  )  [inline, protected, virtual]

Reimplemented in Conexus::IPv4::TCPServer, and Conexus::IPv6::TCPServer.

Referenced by stop().

virtual void Conexus::Server::pre_start (  )  [inline, protected, virtual]

Reimplemented in Conexus::IPv4::TCPServer, and Conexus::IPv6::TCPServer.

Referenced by start().

virtual void Conexus::Server::pre_stop (  )  [inline, protected, virtual]

Referenced by stop().

long Conexus::Server::responsiveness (  )  [virtual]

Returns the server responsiveness level.

References m_timeval.

virtual void Conexus::Server::service_thread_main (  )  [protected, pure virtual]

void Conexus::Server::service_thread_main_proxy (  )  [private]

References service_thread_main().

Referenced by start().

void Conexus::Server::set_responsiveness ( long  r  )  [virtual]

Sets the responsiveness to add_*, remove_* and stop commands in microseconds; lower is more responsive; larger is less responsive; default is 500000 microseconds (or 500 ms).

In general this refers to the timeout period of the select() call used internally. Each cycle of the server I/O thread acquires several mutex locks at the beginning of the cycle and releases them at the end of the cycle.

This value shortens the cycle period, thereby making the server more responsive to commands at the cost of increasing overhead.

References m_timeval.

sigc::signal< void, StartStop > Conexus::Server::signal_start_stop (  ) 

References m_signal_start_stop.

void Conexus::Server::start ( bool  use_dispatcher  )  [virtual]

void Conexus::Server::start (  )  [virtual]

void Conexus::Server::stop (  )  [virtual]


Member Data Documentation

Glib::Dispatcher* Conexus::Server::m_dispatcher [protected]

Reimplemented in Conexus::EndpointServer.

Referenced by start(), and stop().

bool Conexus::Server::m_running [protected]

sigc::signal<void,StartStop> Conexus::Server::m_signal_start_stop [protected]

Referenced by signal_start_stop(), start(), and stop().

bool Conexus::Server::m_terminate [protected]

Glib::Thread* Conexus::Server::m_thread [protected]

Referenced by start(), and stop().

struct timeval Conexus::Server::m_timeval [read, protected]


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

Generated on Wed Jul 8 15:51:20 2009 for conexus by doxygen 1.5.8