DDraceNetwork Documentation
Loading...
Searching...
No Matches
serverbrowser_http.cpp File Reference
#include "serverbrowser_http.h"
#include <base/lock.h>
#include <base/log.h>
#include <base/system.h>
#include <engine/console.h>
#include <engine/engine.h>
#include <engine/external/json-parser/json.h>
#include <engine/serverbrowser.h>
#include <engine/shared/http.h>
#include <engine/shared/jobs.h>
#include <engine/shared/linereader.h>
#include <engine/shared/serverinfo.h>
#include <engine/storage.h>
#include <chrono>
#include <memory>
#include <vector>
Include dependency graph for serverbrowser_http.cpp:

Classes

class  CChooseMaster
class  CChooseMaster::CData
class  CChooseMaster::CJob
class  CServerBrowserHttp

Functions

static int SanitizeAge (std::optional< int64_t > Age)
static int ClassifyAge (int AgeSeconds)
static bool ServerbrowserParseUrl (NETADDR *pOut, const char *pUrl)
IServerBrowserHttpCreateServerBrowserHttp (IEngine *pEngine, IStorage *pStorage, IHttp *pHttp, const char *pPreviousBestUrl)

Variables

static const char * DEFAULT_SERVERLIST_URLS []

Function Documentation

◆ ClassifyAge()

int ClassifyAge ( int AgeSeconds)
static

◆ CreateServerBrowserHttp()

IServerBrowserHttp * CreateServerBrowserHttp ( IEngine * pEngine,
IStorage * pStorage,
IHttp * pHttp,
const char * pPreviousBestUrl )

◆ SanitizeAge()

int SanitizeAge ( std::optional< int64_t > Age)
static

◆ ServerbrowserParseUrl()

bool ServerbrowserParseUrl ( NETADDR * pOut,
const char * pUrl )
static

Variable Documentation

◆ DEFAULT_SERVERLIST_URLS

const char* DEFAULT_SERVERLIST_URLS[]
static
Initial value:
= {
"https://master1.ddnet.org/ddnet/15/servers.json",
"https://master2.ddnet.org/ddnet/15/servers.json",
"https://master3.ddnet.org/ddnet/15/servers.json",
"https://master4.ddnet.org/ddnet/15/servers.json",
}