diff options
author | Northstar <northstar@northstar.tf> | 2022-02-03 22:09:08 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-02-03 22:09:08 -0300 |
commit | 75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch) | |
tree | c9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/serverauthentication.h | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/serverauthentication.h')
-rw-r--r-- | NorthstarDedicatedTest/serverauthentication.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/NorthstarDedicatedTest/serverauthentication.h b/NorthstarDedicatedTest/serverauthentication.h index 55025d6e..faa7ae96 100644 --- a/NorthstarDedicatedTest/serverauthentication.h +++ b/NorthstarDedicatedTest/serverauthentication.h @@ -40,31 +40,31 @@ typedef enum #pragma pack(push, 1) typedef struct netadr_s { - netadrtype_t type; - unsigned char ip[16]; // IPv6 + netadrtype_t type; + unsigned char ip[16]; // IPv6 // IPv4's 127.0.0.1 is [::ffff:127.0.0.1], that is: // 00 00 00 00 00 00 00 00 00 00 FF FF 7F 00 00 01 - unsigned short port; + unsigned short port; } netadr_t; #pragma pack(pop) #pragma pack(push, 1) typedef struct netpacket_s { - netadr_t adr; // sender address - //int source; // received source - char unk[10]; - double received_time; - unsigned char* data; // pointer to raw packet data - void* message; // easy bitbuf data access // 'inpacket.message' etc etc (pointer) - char unk2[16]; - int size; - - //bf_read message; // easy bitbuf data access // 'inpacket.message' etc etc (pointer) - //int size; // size in bytes - //int wiresize; // size in bytes before decompression - //bool stream; // was send as stream - //struct netpacket_s* pNext; // for internal use, should be NULL in public + netadr_t adr; // sender address + // int source; // received source + char unk[10]; + double received_time; + unsigned char* data; // pointer to raw packet data + void* message; // easy bitbuf data access // 'inpacket.message' etc etc (pointer) + char unk2[16]; + int size; + + // bf_read message; // easy bitbuf data access // 'inpacket.message' etc etc (pointer) + // int size; // size in bytes + // int wiresize; // size in bytes before decompression + // bool stream; // was send as stream + // struct netpacket_s* pNext; // for internal use, should be NULL in public } netpacket_t; #pragma pack(pop) @@ -78,10 +78,10 @@ struct UnconnectedPlayerSendData class ServerAuthenticationManager { -private: + private: httplib::Server m_playerAuthServer; -public: + public: std::mutex m_authDataMutex; std::unordered_map<std::string, AuthData> m_authData; std::unordered_map<void*, AdditionalPlayerData> m_additionalPlayerData; @@ -90,7 +90,7 @@ public: bool m_bNeedLocalAuthForNewgame = false; bool m_bForceReadLocalPlayerPersistenceFromDisk = false; -public: + public: void StartPlayerAuthServer(); void StopPlayerAuthServer(); bool AuthenticatePlayer(void* player, int64_t uid, char* authToken); @@ -98,7 +98,7 @@ public: void WritePersistentData(void* player); }; -typedef void(*CBaseClient__DisconnectType)(void* self, uint32_t unknownButAlways1, const char* reason, ...); +typedef void (*CBaseClient__DisconnectType)(void* self, uint32_t unknownButAlways1, const char* reason, ...); extern CBaseClient__DisconnectType CBaseClient__Disconnect; void InitialiseServerAuthentication(HMODULE baseAddress); |