picloud
This commit is contained in:
@@ -28,6 +28,7 @@ void DispatcherServer::printStatus() {
|
||||
auto it = c_servers.makeIterator();
|
||||
while(it.next()){
|
||||
piCout << " " << it.key();
|
||||
it.value()->printStatus();
|
||||
}
|
||||
map_mutex.unlock();
|
||||
}
|
||||
@@ -50,6 +51,13 @@ void DispatcherServer::newConnection(PIEthernet *cl) {
|
||||
c_servers.insert(sname, new CloudServer(c));
|
||||
map_mutex.unlock();
|
||||
});
|
||||
CONNECTL(client, registerClient, [this](PIString sname, DispatcherClient * c){
|
||||
map_mutex.lock();
|
||||
if (c_servers.contains(sname)) {
|
||||
c_servers[sname]->addClient(c);
|
||||
}
|
||||
map_mutex.unlock();
|
||||
});
|
||||
piCoutObj << "add client" << client;
|
||||
map_mutex.lock();
|
||||
clients.push_back(client);
|
||||
|
||||
Reference in New Issue
Block a user