mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
Cleanup & optimizations
This commit is contained in:
committed by
Anonymous275
parent
0580ad67fd
commit
f52308c439
@@ -8,7 +8,7 @@
|
||||
class THeartbeatThread : public IThreaded {
|
||||
public:
|
||||
THeartbeatThread(TResourceManager& ResourceManager, TServer& Server);
|
||||
~THeartbeatThread();
|
||||
//~THeartbeatThread();
|
||||
void operator()() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -8,6 +8,7 @@ public:
|
||||
|
||||
[[nodiscard]] uint64_t MaxModSize() const { return mMaxModSize; }
|
||||
[[nodiscard]] std::string FileList() const { return mFileList; }
|
||||
[[nodiscard]] std::string TrimmedList() const { return mTrimmedList; }
|
||||
[[nodiscard]] std::string FileSizes() const { return mFileSizes; }
|
||||
[[nodiscard]] int ModsLoaded() const { return mModsLoaded; }
|
||||
|
||||
@@ -15,5 +16,6 @@ private:
|
||||
uint64_t mMaxModSize = 0;
|
||||
std::string mFileSizes;
|
||||
std::string mFileList;
|
||||
std::string mTrimmedList;
|
||||
int mModsLoaded = 0;
|
||||
};
|
||||
@@ -12,7 +12,7 @@ class TResourceManager;
|
||||
class TTCPServer : public IThreaded {
|
||||
public:
|
||||
explicit TTCPServer(TServer& Server, TPPSMonitor& PPSMonitor, TResourceManager& ResourceManager);
|
||||
~TTCPServer();
|
||||
//~TTCPServer();
|
||||
|
||||
void operator()() override;
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
TUDPServer& UDPServer() { return mUDPServer->get(); }
|
||||
|
||||
void SyncClient(std::weak_ptr<TClient> c);
|
||||
void SyncClient(const std::weak_ptr<TClient>& c);
|
||||
void Identify(SOCKET TCPSock);
|
||||
void Authentication(SOCKET TCPSock);
|
||||
bool CheckBytes(TClient& c, int32_t BytesRcv);
|
||||
@@ -43,10 +43,10 @@ private:
|
||||
bool mShutdown { false };
|
||||
|
||||
void HandleDownload(SOCKET TCPSock);
|
||||
void OnConnect(std::weak_ptr<TClient> c);
|
||||
void TCPClient(std::weak_ptr<TClient> c);
|
||||
void OnConnect(const std::weak_ptr<TClient>& c);
|
||||
void TCPClient(const std::weak_ptr<TClient>& c);
|
||||
int OpenID();
|
||||
void OnDisconnect(std::weak_ptr<TClient> ClientPtr, bool kicked);
|
||||
void OnDisconnect(const std::weak_ptr<TClient>& ClientPtr, bool kicked);
|
||||
void Parse(TClient& c, const std::string& Packet);
|
||||
void SendFile(TClient& c, const std::string& Name);
|
||||
static bool TCPSendRaw(SOCKET C, char* Data, int32_t Size);
|
||||
|
||||
Reference in New Issue
Block a user