DDraceNetwork Docs
serverbrowser_http.cpp File Reference
#include "serverbrowser_http.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 <base/lock.h>
#include <base/log.h>
#include <base/system.h>
#include <memory>
#include <vector>
#include <chrono>
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)
 
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()

static int ClassifyAge ( int  AgeSeconds)
static

◆ CreateServerBrowserHttp()

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

◆ SanitizeAge()

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

◆ ServerbrowserParseUrl()

bool ServerbrowserParseUrl ( NETADDR pOut,
const char *  pUrl 
)

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",
}