Intra2net AG

libt2n::command_server Class Reference

a server handling incoming commands More...

#include <command_server.hxx>

Inheritance diagram for libt2n::command_server:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 command_server (server &_s)
 ~command_server ()
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)

Protected Member Functions

virtual commandcast_command (command *input)

Private Member Functions

void handle_packet (const std::string &packet, server_connection *conn)
 handle a command including deserialization and answering

Private Attributes

servers
int guard_handle

Detailed Description

a server handling incoming commands


Constructor & Destructor Documentation

libt2n::command_server::command_server ( server _s  ) 
libt2n::command_server::~command_server (  ) 

Destructor


Member Function Documentation

virtual command* libt2n::command_server::cast_command ( command input  )  [inline, protected, virtual]
std::ostream* libt2n::command_server::get_logstream ( log_level_values  level  )  [inline]
void libt2n::command_server::handle ( long long  usec_timeout = -1,
long long *  usec_timeout_remaining = NULL 
)

handle incoming commands

Parameters:
[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(), guard_handle, handle_packet(), and s.

void libt2n::command_server::handle_packet ( const std::string &  packet,
server_connection conn 
) [private]
void libt2n::command_server::send_hello ( unsigned int  conn_id  ) 

send a hello message to a new connection

References libt2n::server::get_connection(), s, and libt2n::connection::write().

Referenced by command_server().


Member Data Documentation

Referenced by handle().


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

Generated on 13 May 2015 by  doxygen 1.6.1
© Intra2net AG 2024 | Legal | Contact