mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-22 20:52:49 +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:
@@ -278,6 +278,21 @@ namespace MasterPackets {
|
||||
uint8_t ugcOnline{};
|
||||
uint32_t ugcPid{};
|
||||
|
||||
// Where each server listens and which machine it runs on, after the worlds' states: master, auth, chat, the
|
||||
// dashboard, the UGC server and every world. `ip` and `port` are what the server said it listens on (the
|
||||
// dashboard and the UGC server: their web port); `host` is its machine, the address master sees its
|
||||
// connection come from (master's own machine, and servers connecting from it, are master's external_ip)
|
||||
struct Endpoint {
|
||||
ServiceType type{};
|
||||
uint32_t zoneID{};
|
||||
uint32_t instanceID{};
|
||||
LUString ip{};
|
||||
uint32_t port{};
|
||||
LUString host{};
|
||||
};
|
||||
std::vector<Endpoint> endpoints; // u32 count, at most MAX_INSTANCES + MAX_OTHER_ENDPOINTS
|
||||
static constexpr uint32_t MAX_OTHER_ENDPOINTS = 16;
|
||||
|
||||
ServerListResponse() : LUBitStream(ServiceType::MASTER, MessageType::Master::SERVER_LIST_RESPONSE) {}
|
||||
void Serialize(RakNet::BitStream& bitStream) const override;
|
||||
bool Deserialize(RakNet::BitStream& bitStream) override;
|
||||
|
||||
Reference in New Issue
Block a user