X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fcommand_server.hxx;h=04508b56f15d260dec6e2946518fac93d4f3fb51;hp=3c0026267a33f9221cd171620d4f47c6144c3664;hb=238ad35f4e3b6516d4ba7611b540a0edeea71427;hpb=539b09c0c1819f9394e5a0ae8b3df3687715fa7c diff --git a/src/command_server.hxx b/src/command_server.hxx index 3c00262..04508b5 100644 --- a/src/command_server.hxx +++ b/src/command_server.hxx @@ -33,16 +33,22 @@ class command_server void handle_packet(const std::string& packet, server_connection* conn); + int guard_handle; + protected: virtual command* cast_command(command* input) { return input; } public: command_server(server& _s); + // TODO: No (virtual) destructor void handle(long long usec_timeout=-1, long long* usec_timeout_remaining=NULL); void send_hello(unsigned int conn_id); + + std::ostream* get_logstream(log_level_values level) + { return s.get_logstream(level); } }; template struct Derived_from { @@ -50,6 +56,10 @@ template struct Derived_from { Derived_from() { void(*p)(T*) = constraints; } }; +/** @brief server handling group of incoming commands + + the template must be derived from libt2n::command. +*/ template class group_command_server : public command_server {