u32 ClientManager::AddClient(QTcpSocket* clientSocket) { u32 tempClientId = clientIdCounter; clientIdCounter++; auto it = clients.find(clientSocket); if (it != clients.end()) { throw "AddClient error: Client already exists"; } clients[clientSocket] = tempClientId; emit ClientAdded(tempClientId); return tempClientId; }
void Notifier::NotifyClientAdded(char *addr) { emit ClientAdded(addr); }