add udpserver, tcpserver

This commit is contained in:
Lion Kortlepel
2021-02-16 15:54:50 +01:00
committed by Anonymous275
parent f19a012509
commit bf74b1ae32
18 changed files with 401 additions and 55 deletions

View File

@@ -30,7 +30,7 @@ void TServer::RemoveClient(std::weak_ptr<TClient> WeakClientPtr) {
std::weak_ptr<TClient> TServer::InsertNewClient() {
debug("inserting new client (" + std::to_string(ClientCount()) + ")");
WriteLock Lock(mClientsMutex);
auto [Iter, Replaced] = mClients.insert(std::make_shared<TClient>());
auto [Iter, Replaced] = mClients.insert(std::make_shared<TClient>(*this));
return *Iter;
}