#include <conexus/server.h>
Inheritance diagram for Conexus::Server:
Public Member Functions | |
virtual void | start (bool use_dispatcher=false) |
virtual void | stop () |
virtual void | set_responsiveness (long r)=0 |
Sets the responsiveness to add_*, remove_* and stop commands in microseconds; lower is more responsive; larger is less responsive; default is 5000 microseconds (or 5 ms). | |
virtual long | responsiveness ()=0 |
Returns the server responsiveness level. | |
virtual bool | is_running () |
virtual const std::string & | object_type () |
Protected Member Functions | |
virtual void | service_thread_main ()=0 |
Protected Attributes | |
pthread_t | m_thread |
pthread_attr_t | m_thread_attr |
bool | m_terminate |
bool | m_running |
Glib::Dispatcher * | m_dispatcher |
bool | m_use_dispatcher |
|
Sets the responsiveness to add_*, remove_* and stop commands in microseconds; lower is more responsive; larger is less responsive; default is 5000 microseconds (or 5 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. Implemented in Conexus::IPv4::TCPServer, and Conexus::IPv6::TCPServer. |