diff options
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.h')
-rw-r--r-- | NorthstarDedicatedTest/masterserver.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h index 1cbc37a5..76e19b48 100644 --- a/NorthstarDedicatedTest/masterserver.h +++ b/NorthstarDedicatedTest/masterserver.h @@ -9,7 +9,7 @@ public: // server info char name[64]; - char* description; + std::string description; char map[32]; char playlist[16]; @@ -24,22 +24,39 @@ public: public: RemoteServerInfo(const char* newId, const char* newName, const char* newDescription, const char* newMap, const char* newPlaylist, int newPlayerCount, int newMaxPlayers); RemoteServerInfo(const char* newId, const char* newName, const char* newDescription, const char* newMap, const char* newPlaylist, int newPlayerCount, int newMaxPlayers, in_addr newIp, int newPort); - ~RemoteServerInfo(); +}; + +struct RemoteServerConnectionInfo +{ +public: + char authToken[32]; + + in_addr ip; + int port; }; class MasterServerManager { private: - bool m_requestingServerList; + bool m_requestingServerList = false; + bool m_authenticatingWithGameServer = false; public: - bool m_scriptRequestingServerList; + bool m_scriptRequestingServerList = false; bool m_successfullyConnected = true; - std::list<RemoteServerInfo> m_remoteServers; + + bool m_scriptAuthenticatingWithGameServer = false; + bool m_successfullyAuthenticatedWithGameServer = false; + + bool m_hasPendingConnectionInfo = false; + RemoteServerConnectionInfo m_pendingConnectionInfo; + + std::vector<RemoteServerInfo> m_remoteServers; public: void ClearServerList(); void RequestServerList(); + void TryAuthenticateWithServer(char* serverId, char* password); }; void InitialiseSharedMasterServer(HMODULE baseAddress); |