aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.h')
-rw-r--r--NorthstarDedicatedTest/masterserver.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h
index e51477a2..85237f23 100644
--- a/NorthstarDedicatedTest/masterserver.h
+++ b/NorthstarDedicatedTest/masterserver.h
@@ -1,5 +1,6 @@
#pragma once
#include "convar.h"
+#include "httplib.h"
#include <WinSock2.h>
struct RemoteModInfo
@@ -66,6 +67,7 @@ class MasterServerManager
private:
bool m_requestingServerList = false;
bool m_authenticatingWithGameServer = false;
+ httplib::Client* m_httpClient = nullptr;
public:
char m_ownServerId[33];
@@ -92,6 +94,18 @@ public:
bool m_bHasMainMenuPromoData = false;
MainMenuPromoData m_MainMenuPromoData;
+private:
+ void LazyCreateHttpClient();
+ bool RequestServerListThread();
+ bool RequestMainMenuPromosThread();
+ bool AuthenticateOriginWithMasterServerThread(std::string uidStr, std::string tokenStr);
+ bool AuthenticateWithOwnServerThread(char* uid, char* playerToken);
+ bool AuthenticateWithServerThread(char* uid, char* playerToken, char* serverId, char* password);
+ bool AddSelfToServerListThread(int port, int authPort, char* name, char* description, char* map, char* playlist, int maxPlayers, char* password);
+ bool UpdateServerMapAndPlaylistThread(char* map, char* playlist, int playerCount);
+ bool WritePlayerPersistentDataThread(std::string playerId, char* pdata, size_t pdataSize);
+ bool RemoveSelfFromServerListThread();
+
public:
void ClearServerList();
void RequestServerList();