X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f27c218d18ebf7198e07249aca1eed625da914fd..3a8788fb198a1e0590823745f39fbff81056db09:/Server/src/tcpserver.cpp?ds=inline diff --git a/Server/src/tcpserver.cpp b/Server/src/tcpserver.cpp index 8569c7a..0f97fe5 100644 --- a/Server/src/tcpserver.cpp +++ b/Server/src/tcpserver.cpp @@ -110,6 +110,21 @@ void TCPServer::real_run(void) { } } +TCPServer::ConnectionInfoList TCPServer::get_connected(void) { +#ifdef DEBUG + cerr << __FILE__ << ": get_connected()" << endl; +#endif // DEBUG + TCPServer::ConnectionInfoList con; + Glib::Mutex::Lock lock(connections_mutex); + for (ConnectionList::const_iterator i = connections.begin(); + i != connections.end(); i++) { + TCPServer::ConnectionInfo ci = + { (*i)->get_peerhost(), (*i)->get_peerport() }; + con.push_back(ci); + } + return con; +} + } // namespace Server } // namespace PlaQui