Esempio n. 1
0
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;
}
Esempio n. 2
0
void Notifier::NotifyClientAdded(char *addr)
{
    emit ClientAdded(addr);
}