mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-17 12:13:57 +00:00
move TIoPollThread out and use it in TServer
the previous IoCtx was never being polled
This commit is contained in:
+3
-3
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "IThreaded.h"
|
||||
#include "RWMutex.h"
|
||||
#include "TIoPollThread.h"
|
||||
#include "TScopedTimer.h"
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
@@ -50,11 +51,10 @@ public:
|
||||
|
||||
const TScopedTimer UptimeTimer;
|
||||
|
||||
// asio io context
|
||||
io_context& IoCtx() { return mIoCtx; }
|
||||
io_context& IoCtx() { return mIoCtxPoller.IoCtx(); }
|
||||
|
||||
private:
|
||||
io_context mIoCtx {};
|
||||
TIoPollThread mIoCtxPoller;
|
||||
TClientSet mClients;
|
||||
mutable RWMutex mClientsMutex;
|
||||
static void ParseVehicle(TClient& c, const std::string& Pckt, TNetwork& Network);
|
||||
|
||||
Reference in New Issue
Block a user