DDNet documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
serverbrowser_ping_cache.h
Go to the documentation of this file.
1
#ifndef ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
2
#define ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
3
#include <
base/types.h
>
4
5
class
IConsole
;
6
class
IStorage
;
7
8
class
IServerBrowserPingCache
9
{
10
public
:
11
virtual
~IServerBrowserPingCache
() =
default
;
12
13
virtual
void
Load
() = 0;
14
15
virtual
int
NumEntries
()
const
= 0;
16
virtual
void
CachePing
(
const
NETADDR
&Addr,
int
Ping) = 0;
17
// Returns -1 if the ping isn't cached.
18
virtual
int
GetPing
(
const
NETADDR
*pAddrs,
int
NumAddrs)
const
= 0;
19
};
20
21
IServerBrowserPingCache
*
CreateServerBrowserPingCache
(
IConsole
*pConsole,
IStorage
*pStorage);
22
#endif
// ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
IConsole
Definition
console.h:22
IServerBrowserPingCache
Definition
serverbrowser_ping_cache.h:9
IServerBrowserPingCache::NumEntries
virtual int NumEntries() const =0
IServerBrowserPingCache::CachePing
virtual void CachePing(const NETADDR &Addr, int Ping)=0
IServerBrowserPingCache::Load
virtual void Load()=0
IServerBrowserPingCache::GetPing
virtual int GetPing(const NETADDR *pAddrs, int NumAddrs) const =0
IServerBrowserPingCache::~IServerBrowserPingCache
virtual ~IServerBrowserPingCache()=default
IStorage
Definition
storage.h:21
CreateServerBrowserPingCache
IServerBrowserPingCache * CreateServerBrowserPingCache(IConsole *pConsole, IStorage *pStorage)
Definition
serverbrowser_ping_cache.cpp:170
NETADDR
Definition
types.h:168
types.h
src
engine
client
serverbrowser_ping_cache.h
Generated by
1.18.0