From: Leandro Lucarella Date: Thu, 23 Oct 2003 01:30:19 +0000 (+0000) Subject: Se agrega la definicion del metodo new_connection() que era lo que daba un error... X-Git-Tag: svn_import~378 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/fc388ed8c2016ad44f83d20859bf864562f731a1?ds=inline Se agrega la definicion del metodo new_connection() que era lo que daba un error al linkear. --- 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) {