mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-13 02:03:44 +00:00
Add server identification packet
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "Client.h"
|
||||
#include "Common.h"
|
||||
#include "LuaAPI.h"
|
||||
#include "THeartbeatThread.h"
|
||||
#include "TLuaEngine.h"
|
||||
#include "TScopedTimer.h"
|
||||
#include "nlohmann/json.hpp"
|
||||
@@ -246,6 +247,9 @@ void TNetwork::Identify(TConnection&& RawConnection) {
|
||||
boost::system::error_code ec;
|
||||
write(RawConnection.Socket, buffer("P"), ec);
|
||||
return;
|
||||
} else if (Code == 'I') {
|
||||
boost::system::error_code ec;
|
||||
write(RawConnection.Socket, buffer(THeartbeatThread::lastCall), ec);
|
||||
} else {
|
||||
beammp_errorf("Invalid code got in Identify: '{}'", Code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user