mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-07 08:16:24 +00:00
add PPSMonitor
This commit is contained in:
committed by
Anonymous275
parent
72607583bf
commit
f19a012509
@@ -5,6 +5,7 @@
|
||||
#include <mutex>
|
||||
#include <sio_client.h>
|
||||
#include <thread>
|
||||
#include <memory>
|
||||
|
||||
/*
|
||||
* We send relevant server events over socket.io to the backend.
|
||||
@@ -44,10 +45,10 @@ public:
|
||||
|
||||
~SocketIO();
|
||||
|
||||
void SetAuthenticated(bool auth) { _Authenticated = auth; }
|
||||
void SetAuthenticated(bool auth) { mAuthenticated = auth; }
|
||||
|
||||
private:
|
||||
SocketIO();
|
||||
SocketIO() noexcept;
|
||||
|
||||
void ThreadMain();
|
||||
|
||||
@@ -57,12 +58,12 @@ private:
|
||||
std::string Data;
|
||||
};
|
||||
|
||||
bool _Authenticated { false };
|
||||
sio::client _Client;
|
||||
std::thread _Thread;
|
||||
std::atomic_bool _CloseThread { false };
|
||||
std::mutex _QueueMutex;
|
||||
std::deque<Event> _Queue;
|
||||
bool mAuthenticated { false };
|
||||
sio::client mClient;
|
||||
std::thread mThread;
|
||||
std::atomic_bool mCloseThread { false };
|
||||
std::mutex mQueueMutex;
|
||||
std::deque<Event> mQueue;
|
||||
|
||||
friend std::unique_ptr<SocketIO> std::make_unique<SocketIO>();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user