X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/43203fc1132e402ab5751167ed64196f10f5dedf..2f5c973fdf3f7fb25b13996b66d566c58066f6a0:/Server/include/plaqui/server/server.h diff --git a/Server/include/plaqui/server/server.h b/Server/include/plaqui/server/server.h index f16e2df..e66be38 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,7 @@ 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); };