PICloud connect/disconnect
This commit is contained in:
@@ -20,11 +20,13 @@ PIString CloudServer::serverName() const {
|
||||
|
||||
void CloudServer::addClient(DispatcherClient * c) {
|
||||
clients << c;
|
||||
index_clients.insert(c->clientId(), c);
|
||||
}
|
||||
|
||||
|
||||
void CloudServer::removeClient(DispatcherClient * c) {
|
||||
clients.removeOne(c);
|
||||
index_clients.removeOne(c->clientId());
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +36,11 @@ PIVector<DispatcherClient *> CloudServer::getClients() {
|
||||
|
||||
|
||||
void CloudServer::printStatus() {
|
||||
piCout << " " << "Clients for" << server->address() << ":";
|
||||
piCout << " " << "Clients for" << server->address() << server_name << ":";
|
||||
for (auto c: clients) {
|
||||
piCout << " " << c->address();
|
||||
piCout << " " << c->address() << c->clientId();
|
||||
}
|
||||
for (auto c: clients) c->sendData(PIByteArray::fromHex("000000"));
|
||||
server->sendData(PIByteArray::fromHex("000000"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user