aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.h')
-rw-r--r--NorthstarDedicatedTest/masterserver.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h
index 85237f23..d3c83052 100644
--- a/NorthstarDedicatedTest/masterserver.h
+++ b/NorthstarDedicatedTest/masterserver.h
@@ -1,6 +1,5 @@
#pragma once
#include "convar.h"
-#include "httplib.h"
#include <WinSock2.h>
struct RemoteModInfo
@@ -38,7 +37,7 @@ public:
char authToken[32];
in_addr ip;
- int port;
+ unsigned short port;
};
struct MainMenuPromoData
@@ -67,10 +66,10 @@ class MasterServerManager
private:
bool m_requestingServerList = false;
bool m_authenticatingWithGameServer = false;
- httplib::Client* m_httpClient = nullptr;
public:
char m_ownServerId[33];
+ char m_ownServerAuthToken[33];
char m_ownClientAuthToken[33];
bool m_bOriginAuthWithMasterServerDone = false;
@@ -95,18 +94,10 @@ public:
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();
+ void SetCommonHttpClientOptions(CURL* curl);
public:
+ MasterServerManager();
void ClearServerList();
void RequestServerList();
void RequestMainMenuPromos();