mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
NucleusID/OriginID is an unsigned type, changed all types to uint64_t and cleaned up redundant code.
28 lines
780 B
C++
28 lines
780 B
C++
#pragma once
|
|
#include "serverlisting.h"
|
|
|
|
namespace R5Net
|
|
{
|
|
class Client
|
|
{
|
|
public:
|
|
Client(std::string serverString) : m_HttpClient(serverString.c_str())
|
|
{
|
|
m_HttpClient.set_connection_timeout(10);
|
|
}
|
|
|
|
std::vector<ServerListing> GetServersList(std::string& svOutMessage);
|
|
bool PostServerHost(std::string& svOutMessage, std::string& svOutToken, const ServerListing& slServerListing);
|
|
bool GetServerByToken(ServerListing& slOutServer, std::string& svOutMessage, const std::string svToken);
|
|
bool GetClientIsBanned(std::string svIpAddress, uint64_t nOriginID, std::string& svOutErrCl);
|
|
std::string GetSDKVersion();
|
|
|
|
Client* pR5net = nullptr;
|
|
Client* GetR5Net() { return pR5net; }
|
|
|
|
private:
|
|
httplib::Client m_HttpClient;
|
|
};
|
|
}
|
|
extern R5Net::Client* g_pR5net;
|