]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/src/tcpserver.cpp
* Se agrega un Tanque al ejemplo, y ANDA!!!!
[z.facultad/75.42/plaqui.git] / Server / src / tcpserver.cpp
index 8569c7ab9b292073e725b2cb539c3eeb24e0a646..0f97fe5a762b5fbaebcfc0410ff62685cbad39cf 100644 (file)
@@ -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
 } // namespace Server
 
 } // namespace PlaQui