picloud next iteration
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user