PICloud change protocol > server_uuid
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "cloudserver.h"
|
||||
|
||||
CloudServer::CloudServer(DispatcherClient * c, const PIString & sname) : server(c) {
|
||||
setName(sname);
|
||||
server_name = sname;
|
||||
CloudServer::CloudServer(DispatcherClient * c, const PIByteArray & sname) : server(c) {
|
||||
setName(sname.toHex());
|
||||
server_uuid = sname;
|
||||
CONNECTL(c, dataReadedServer, ([this](uint id, PIByteArray & ba){
|
||||
DispatcherClient * cl = index_clients.value(id, nullptr);
|
||||
if (cl) cl->sendData(ba);
|
||||
@@ -17,8 +17,8 @@ CloudServer::~CloudServer() {
|
||||
}
|
||||
|
||||
|
||||
PIString CloudServer::serverName() const {
|
||||
return server_name;
|
||||
PIByteArray CloudServer::serverUUID() const {
|
||||
return server_uuid;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ PIVector<DispatcherClient *> CloudServer::getClients() {
|
||||
|
||||
|
||||
void CloudServer::printStatus() {
|
||||
piCout << " " << "Clients for" << server->address() << server_name << ":";
|
||||
piCout << " " << "Clients for" << server->address() << server_uuid.toHex() << ":";
|
||||
for (auto c: clients) {
|
||||
piCout << " " << c->address() << c->clientId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user