X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/43203fc1132e402ab5751167ed64196f10f5dedf..f1f2d6a48b96c759d197d1227e157665d0d7bbcc:/Server/include/plaqui/server/tcpserver.h diff --git a/Server/include/plaqui/server/tcpserver.h b/Server/include/plaqui/server/tcpserver.h index b379844..393f4cc 100644 --- a/Server/include/plaqui/server/tcpserver.h +++ b/Server/include/plaqui/server/tcpserver.h @@ -28,10 +28,9 @@ #ifndef PLAQUI_TCPSERVER_H #define PLAQUI_TCPSERVER_H -#include "plaqui/server/controlserver.h" -#include "plaqui/server/transmitter.h" +#include "plaqui/server/runnable.h" +#include "plaqui/server/connection.h" #include -#include #include namespace PlaQui { @@ -48,8 +47,11 @@ namespace Server { private: + /// Cantidad máxima de conexiones pendientes. + static const unsigned MAX_PENDING_CONNECTIONS; + /// Lista de conexiones de control. - typedef std::list ConnectionList; + typedef std::list ConnectionList; // Atributos. @@ -58,6 +60,9 @@ namespace Server { /// Socket para escuchar conexiones. sockinetbuf socket; + /// Mutex para las conexiones. + Glib::Mutex connections_mutex; + /// Conexiones de control. ConnectionList connections; @@ -86,7 +91,7 @@ namespace Server { /** * Destructor. */ - virtual ~TCPServer(void) {} + virtual ~TCPServer(void); /** * Constructor.