fix client insert/create issue

This commit is contained in:
Lion Kortlepel authored and Anonymous275 committed 2021-03-18 23:44:14 +02:00
1 parent b3256062f7
commit bca4b3f140
4 files changed
+33 -27

No files matched your search

+1
View File
@@ -18,6 +18,7 @@ public:
TServer(int argc, char** argv);
void InsertClient(std::shared_ptr<TClient> Ptr);
std::weak_ptr<TClient> InsertNewClient();
void RemoveClient(std::weak_ptr<TClient>);
// in Fn, return true to continue, return false to break
+2 -1
View File
@@ -17,7 +17,7 @@ public:
bool TCPSend(TClient& c, const std::string& Data);
void SendLarge(TClient& c, std::string Data);
void Respond(TClient& c, const std::string& MSG, bool Rel);
std::weak_ptr<TClient> CreateClient(SOCKET TCPSock);
std::shared_ptr<TClient> CreateClient(SOCKET TCPSock);
std::string TCPRcv(TClient& c);
void ClientKick(TClient& c, const std::string& R);
@@ -32,6 +32,7 @@ public:
void SyncResources(TClient& c);
void UpdatePlayers();
private:
std::optional<std::reference_wrapper<TUDPServer>> mUDPServer { std::nullopt };
TServer& mServer;