new method PIClientServer::Server::closeAll()
PISignals::releaseSignals()
This commit is contained in:
@@ -90,6 +90,18 @@ void PIClientServer::Server::listen(PINetworkAddress addr) {
|
||||
}
|
||||
|
||||
|
||||
void PIClientServer::Server::closeAll() {
|
||||
clients_mutex.lock();
|
||||
for (auto c: clients) {
|
||||
c->aboutDelete();
|
||||
c->destroy();
|
||||
delete c;
|
||||
}
|
||||
clients.clear();
|
||||
clients_mutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
void PIClientServer::Server::setMaxClients(int new_max_clients) {
|
||||
max_clients = new_max_clients;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user