mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-21 12:12:48 +00:00
feat(master): the server list names each server's port and machine
Master keeps the address and port auth, chat, the dashboard and the UGC server report when they connect and sends them, with its own and every world's, after the list's world states. A server's machine is the address master sees its connection come from; loopback and master's external_ip are master's machine. Servers can report another port than their RakNet one; the UGC server reports its web port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,10 @@ public:
|
||||
using ConnectionIdentity = std::function<void(const SystemAddress& sysAddr, TrafficStats::Connection& connection)>;
|
||||
void SetConnectionIdentity(ConnectionIdentity identity) { mConnectionIdentity = std::move(identity); }
|
||||
|
||||
// The port this server tells master it listens on (its ServerInfo, shown on the dashboard's Network page): its
|
||||
// RakNet port unless set. The dashboard and the UGC server set their web port.
|
||||
void SetAdvertisedPort(uint32_t port) { mAdvertisedPort = port; }
|
||||
|
||||
bool IsConnected(const SystemAddress& sysAddr);
|
||||
const std::string& GetIP() const { return mIP; }
|
||||
const int GetPort() const { return mPort; }
|
||||
@@ -124,6 +128,7 @@ protected:
|
||||
Logger* mLogger = nullptr;
|
||||
dConfig* mConfig = nullptr;
|
||||
RakPeerInterface* mPeer = nullptr;
|
||||
uint32_t mAdvertisedPort = 0;
|
||||
ReplicaManager* mReplicaManager = nullptr;
|
||||
NetworkIDManager* mNetIDManager = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user