mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-05-19 16:10:41 +00:00
major refactor of Client and Server
this refactor includes changes to TClient: - all member fields are now public, but protected with Sync (an alias for boost::synchronized_value - removed all (now) obsolete getters and setters changes to TServer and TNetwork: - thread-safe ID generation, previously it was possible for there to be ID duplicates. this is now solved by moving id generation and assignment into the same mutex locked context. - deprecated ForEachClientWeak and replaced some usages of it with ForEachClient, getting rid of the weak_ptr shit in most places - implemented a bunch of new functions for getting rid of more weak_ptr everywhere
This commit is contained in:
+2
-1
@@ -43,8 +43,9 @@ private:
|
||||
void OnConnect(const std::weak_ptr<TClient>& c);
|
||||
void TCPClient(const std::weak_ptr<TClient>& c);
|
||||
void Looper(const std::weak_ptr<TClient>& c);
|
||||
int OpenID();
|
||||
void OnDisconnect(const std::shared_ptr<TClient>& ClientPtr);
|
||||
void OnDisconnect(const std::weak_ptr<TClient>& ClientPtr);
|
||||
void OnDisconnect(TClient& Client);
|
||||
void Parse(TClient& c, const std::vector<uint8_t>& Packet);
|
||||
void SendFile(TClient& c, const std::string& Name);
|
||||
static bool TCPSendRaw(TClient& C, ip::tcp::socket& socket, const uint8_t* Data, size_t Size);
|
||||
|
||||
Reference in New Issue
Block a user