This commit is contained in:
2020-08-27 19:40:11 +03:00
parent e1f2c90790
commit 234d4e73be
9 changed files with 101 additions and 20 deletions

View File

@@ -1,5 +1,24 @@
#include "cloudserver.h"
CloudServer::CloudServer(DispatcherClient * client) {
CloudServer::CloudServer(DispatcherClient * c) : server(c) {
}
CloudServer::~CloudServer() {
for (auto c :clients) {
c->close();
}
}
void CloudServer::addClient(DispatcherClient * c) {
clients << c;
}
void CloudServer::printStatus() {
piCout << " " << "Clients for" << server->address() << ":";
for (auto c: clients) {
piCout << " " << c->address();
}
}