aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.h
diff options
context:
space:
mode:
authorHappyDOGE <28511119+HappyDOGE@users.noreply.github.com>2021-12-28 12:22:07 +0300
committerHappyDOGE <28511119+HappyDOGE@users.noreply.github.com>2021-12-28 12:22:07 +0300
commitdf49442053ac0a910349489d0ff79c7bb3af1db3 (patch)
tree7c1d89f795380d676b5aaa8687616a66a1d051a2 /NorthstarDedicatedTest/masterserver.h
parente49f026c92c75c4f10afd7f8895d8ebe2a01e97d (diff)
parente5684053f4127bd02681ef46e0bfeada83b2f63c (diff)
downloadNorthstarLauncher-df49442053ac0a910349489d0ff79c7bb3af1db3.tar.gz
NorthstarLauncher-df49442053ac0a910349489d0ff79c7bb3af1db3.zip
merge with upstream
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();