From fc388ed8c2016ad44f83d20859bf864562f731a1 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 23 Oct 2003 01:30:19 +0000 Subject: [PATCH] Se agrega la definicion del metodo new_connection() que era lo que daba un error al linkear. --- Server/src/server.cpp | 18 ++++++++++++++++++ Server/tests/server_test.cpp | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Server/src/server.cpp b/Server/src/server.cpp index 4d25ff6..8f33449 100644 --- a/Server/src/server.cpp +++ b/Server/src/server.cpp @@ -26,6 +26,9 @@ // #include "plaqui/server/server.h" +#include "plaqui/server/connection.h" +#include "plaqui/server/controlserver.h" +#include #ifdef DEBUG # include #endif // DEBUG @@ -52,6 +55,21 @@ bool PlaQui::Server::Server::start_transmission(std::string host, int port) { // TODO return false; } + +PlaQui::Server::Connection* +PlaQui::Server::Server::new_connection(const sockbuf::sockdesc& sd) { +#ifdef DEBUG + std::cerr << __FILE__ << ": new_connection(sd = " << sd.sock << ")" + << std::endl; +#endif // DEBUG + PlaQui::Server::ControlServer* conn = new PlaQui::Server::ControlServer(sd); + // TODO verificar si el new se hace bien? no creo. + conn->signal_command_received().connect( + SigC::slot_class(*this, + &PlaQui::Server::Server::on_control_command_received)); + // TODO: + return conn; +} /// \todo Implementar. bool PlaQui::Server::Server::stop_transmission(std::string host, int port) { diff --git a/Server/tests/server_test.cpp b/Server/tests/server_test.cpp index 5b0df00..eddd8dd 100644 --- a/Server/tests/server_test.cpp +++ b/Server/tests/server_test.cpp @@ -37,7 +37,7 @@ using namespace PlaQui::Server; int main(int argc, char* argv[]) { // Termina con mas informacion si hay una excepcion no manejada. - std::set_terminate (__gnu_cxx::__verbose_terminate_handler); + set_terminate (__gnu_cxx::__verbose_terminate_handler); // Necesita argumentos. if (argc != 2) { -- 2.43.0