aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.h
diff options
context:
space:
mode:
authorHappyDOGE <28511119+HappyDOGE@users.noreply.github.com>2022-01-03 14:33:16 +0300
committerHappyDOGE <28511119+HappyDOGE@users.noreply.github.com>2022-01-03 14:33:16 +0300
commitf3ffed0742d62adf48c37dca0acfad621724c21b (patch)
tree7e78b6f15bb4cd0f54fa982446061b0b39643e0c /NorthstarDedicatedTest/masterserver.h
parent2942ea56527100d5e39e0bbba4a1d16b1cde6128 (diff)
parent966f5052b7b59fc7200eb736c8d393056e0389cd (diff)
downloadNorthstarLauncher-f3ffed0742d62adf48c37dca0acfad621724c21b.tar.gz
NorthstarLauncher-f3ffed0742d62adf48c37dca0acfad621724c21b.zip
merge with upstream
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();