]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/include/plaqui/server/tcpserver.h
- Se sobreescribe el método Connection::finish() para que cierre el socket.
[z.facultad/75.42/plaqui.git] / Server / include / plaqui / server / tcpserver.h
index 7465faa7a2d0cb9563a29285ade035b3aa3ba3da..1cd344f4da3599eea86ddade2da09cfc7df9783c 100644 (file)
@@ -32,6 +32,7 @@
 #include "plaqui/server/connection.h"
 #include <socket++/sockinet.h>
 #include <list>
+#include <vector>
 
 namespace PlaQui {
 
@@ -57,6 +58,19 @@ namespace Server {
                        /// Lista de conexiones de control.
                        typedef std::list<Connection*> ConnectionList;
 
+               public:
+
+                       /// Información sobre una conexión de contro.
+                       struct ConnectionInfo {
+                               /// Host.
+                               std::string host;
+                               /// Port.
+                               unsigned port;
+                       };
+
+                       /// Lista de información de conexiones de control.
+                       typedef std::vector<ConnectionInfo> ConnectionInfoList;
+
                // Atributos.
 
                private:
@@ -111,6 +125,11 @@ namespace Server {
                         */
                        void on_connection_finished(Connection* connection);
 
+                       /**
+                        * Obtiene una lista conexiones de control abiertas.
+                        */
+                       ConnectionInfoList get_connected(void);
+
        };
 
 }