mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
Merge TUDPServer and TTCPServer into TNetwork
this gets rid of a bunch of unclear cases which I mistakenly created while refactoring for this rewrite. One example is having to call into TTCPServer to do UDP sending in some cases.
This commit is contained in:
committed by
Anonymous275
parent
05c5fb047c
commit
40cae31885
@@ -1,6 +1,6 @@
|
||||
#include "TPPSMonitor.h"
|
||||
#include "Client.h"
|
||||
#include "TTCPServer.h"
|
||||
#include "TNetwork.h"
|
||||
|
||||
TPPSMonitor::TPPSMonitor(TServer& Server)
|
||||
: mServer(Server) {
|
||||
@@ -16,7 +16,7 @@ TPPSMonitor::TPPSMonitor(TServer& Server)
|
||||
Start();
|
||||
}
|
||||
void TPPSMonitor::operator()() {
|
||||
while (!mTCPServer) {
|
||||
while (!mNetwork) {
|
||||
// hard spi
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
@@ -46,7 +46,7 @@ void TPPSMonitor::operator()() {
|
||||
return true;
|
||||
});
|
||||
for (auto& ClientToKick : TimedOutClients) {
|
||||
TCPServer().ClientKick(*ClientToKick, "Timeout (no ping for >10 seconds)");
|
||||
Network().ClientKick(*ClientToKick, "Timeout (no ping for >10 seconds)");
|
||||
}
|
||||
TimedOutClients.clear();
|
||||
if (C == 0 || mInternalPPS == 0) {
|
||||
|
||||
Reference in New Issue
Block a user