X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/43203fc1132e402ab5751167ed64196f10f5dedf..f29a7129de56edca96ea8ef58576898c1e52ed6f:/Server/include/plaqui/server/server.h?ds=sidebyside diff --git a/Server/include/plaqui/server/server.h b/Server/include/plaqui/server/server.h index f16e2df..8c92ca8 100644 --- a/Server/include/plaqui/server/server.h +++ b/Server/include/plaqui/server/server.h @@ -31,6 +31,7 @@ #include "plaqui/server/tcpserver.h" #include "plaqui/server/controlserver.h" #include "plaqui/server/transmitter.h" +#include "plaqui/server/command.h" #include #include #include @@ -67,19 +68,23 @@ namespace Server { // Métodos. - private: + protected: /** - * Entra en el loop para atender conexiones. + * Obtiene una nueva \ref Connection "conexión". + * + * \param sd Descriptor del socket de la nueva conexión. + * + * \return Nueva conexión. */ - virtual void real_run(void); + virtual Connection* new_connection(const sockbuf::sockdesc& sd); public: /** * Destructor. */ - virtual ~Server(void) {} + virtual ~Server(void); /** * Constructor. @@ -120,7 +125,8 @@ namespace Server { * * \todo Hacer un tipo Command abstracto o algo así. */ - void on_connection_command_received(void* command); + void on_control_command_received(const Command& command, + ControlServer* server); };