#include <conexus/ipv4_tcpserver.h>
Inheritance diagram for Conexus::IPv4::TCPServer:
Public Types | |
typedef boost::shared_ptr< TCPServer > | pointer |
Public Member Functions | |
TCPServer (uint16_t port=0) | |
virtual Address & | local_interface () |
virtual void | set_local_interface (Address addr) |
virtual void | start (bool use_dispatcher=false) |
virtual void | stop () |
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 5000 microseconds (or 5 ms). | |
long | responsiveness () |
Returns the server responsiveness level. | |
virtual const std::string & | object_type () |
Static Public Member Functions | |
static TCPServer::pointer | create (uint16_t port=0) |
Protected Member Functions | |
virtual void | service_thread_main () |
Protected Attributes | |
timeval | m_timeval |
Conexus::Socket | m_tcp_listener |
Address | m_local_interface |
|
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. Implements Conexus::Server. |