X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/6983220ff84632481c1628720fe15b8f3ac1c9cb..c0e0cf58ce033421d125afb813636f102456592c:/Server/src/transmitter.cpp?ds=inline diff --git a/Server/src/transmitter.cpp b/Server/src/transmitter.cpp index a1ac7b0..de940f9 100644 --- a/Server/src/transmitter.cpp +++ b/Server/src/transmitter.cpp @@ -45,15 +45,19 @@ Transmitter::~Transmitter(void) { #endif // DEBUG } -Transmitter::Transmitter(const string& _host, const Connection::Port& _port): +Transmitter::Transmitter(string& _host, Connection::Port& _port): Connection(sockbuf::sock_dgram, _host, _port) { #ifdef DEBUG cerr << __FILE__ << ": _host = " << _host << " | _port = " << _port << endl; #endif // DEBUG socket->connect(host.c_str(), port); - host = socket->peerhost(); - port = socket->peerport(); + // Reasigno el host y puerto bien, tanto de este objeto como los que se + // environ para indicar su valor correcto. + host = socket->peerhost(); + port = socket->peerport(); + _host = socket->peerhost(); + _port = socket->peerport(); } /// \todo debría dar una excepción (?)