server handling group of incoming commands More...
#include <command_server.hxx>
Public Member Functions | |
group_command_server (server &_s) | |
void | handle (long long usec_timeout=-1, long long *usec_timeout_remaining=NULL) |
handle incoming commands | |
void | send_hello (unsigned int conn_id) |
send a hello message to a new connection | |
std::ostream * | get_logstream (log_level_values level) |
Private Member Functions | |
virtual command * | cast_command (command *input) |
server handling group of incoming commands
the template must be derived from libt2n::command.
libt2n::group_command_server< COMMAND_GROUP >::group_command_server | ( | server & | _s | ) | [inline] |
virtual command* libt2n::group_command_server< COMMAND_GROUP >::cast_command | ( | command * | input | ) | [inline, private, virtual] |
Reimplemented from libt2n::command_server.
std::ostream* libt2n::command_server::get_logstream | ( | log_level_values | level | ) | [inline, inherited] |
References libt2n::server::get_logstream(), and libt2n::command_server::s.
void libt2n::command_server::handle | ( | long long | usec_timeout = -1 , |
|
long long * | usec_timeout_remaining = NULL | |||
) | [inherited] |
handle incoming commands
[in,out] | usec_timeout | wait until new data is found, max timeout usecs. -1: wait endless, 0: instant return |
[out] | usec_timeout_remaining | microseconds from the timeout that were not used |
References libt2n::server::cleanup(), libt2n::connection::close(), libt2n::error, EXCEPTIONSTREAM, libt2n::server::fill_buffer(), libt2n::server::get_connection(), libt2n::server::get_packet(), libt2n::command_server::guard_handle, libt2n::command_server::handle_packet(), and libt2n::command_server::s.
void libt2n::command_server::send_hello | ( | unsigned int | conn_id | ) | [inherited] |
send a hello message to a new connection
References libt2n::server::get_connection(), libt2n::command_server::s, and libt2n::connection::write().
Referenced by libt2n::command_server::command_server().