picloud next iteration

This commit is contained in:
2021-04-05 17:42:02 +03:00
parent 8eff5d24c9
commit f0d4801d3c
13 changed files with 237 additions and 90 deletions

View File

@@ -1,7 +1,8 @@
#include "cloudserver.h"
CloudServer::CloudServer(DispatcherClient * c) : server(c) {
CloudServer::CloudServer(DispatcherClient * c, const PIString & sname) : server(c) {
setName(sname);
server_name = sname;
}
@@ -12,13 +13,30 @@ CloudServer::~CloudServer() {
}
PIString CloudServer::serverName() const {
return server_name;
}
void CloudServer::addClient(DispatcherClient * c) {
clients << c;
}
void CloudServer::removeClient(DispatcherClient * c) {
clients.removeOne(c);
}
PIVector<DispatcherClient *> CloudServer::getClients() {
return clients;
}
void CloudServer::printStatus() {
piCout << " " << "Clients for" << server->address() << ":";
for (auto c: clients) {
piCout << " " << c->address();
}
}