X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/212f9ae5dc8899bab8b23ed13d81c28c510db3c3..658a6629fd4958dad9add9d2a1e06de6003fa5aa:/Server/src/tcpserver.cpp?ds=sidebyside diff --git a/Server/src/tcpserver.cpp b/Server/src/tcpserver.cpp index 8272e57..8b1c3bb 100644 --- a/Server/src/tcpserver.cpp +++ b/Server/src/tcpserver.cpp @@ -71,6 +71,7 @@ TCPServer::TCPServer(const Connection::Port& port) throw(sockerr): //cerr << "sendtimeout = " << socket.sendtimeout(1) << endl; //cerr << "recvtimeout = " << socket.recvtimeout(1) << endl; //cerr << "sendtimeout = " << socket.sendtimeout(1) << endl; + socket.reuseaddr(true); socket.bind(port); #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" @@ -115,8 +116,7 @@ void TCPServer::on_connection_finished(Connection* connection) { #endif // DEBUG } -/// \todo TODO: ver tema de timeout o como salir de un accept(). -void TCPServer::real_run(void) { +void TCPServer::real_run(void) throw() { #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" << ": real_run()" << endl;