]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/include/plaqui/server/server.h
Ya se mandan seniales cuando se reciben comandos.
[z.facultad/75.42/plaqui.git] / Server / include / plaqui / server / server.h
index f16e2dfbb5eed5e0e4666abf23386345fa7982a4..e66be38c1ee985eaeec8211b3d50c03a2df1ed82 100644 (file)
@@ -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 <socket++/sockinet.h>
 #include <string>
 #include <list>
@@ -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);
 
        };