]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/include/plaqui/server/server.h
- Se agrega el método HTTPRequest::method_str() para obtener el método como un
[z.facultad/75.42/plaqui.git] / Server / include / plaqui / server / server.h
index f16e2dfbb5eed5e0e4666abf23386345fa7982a4..8c92ca806942011126082d0607507ecdf67c6cb3 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,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);
 
        };