mirror of
https://github.com/ddnet/ddnet.git
synced 2024-10-20 15:58:18 +00:00
6600024f24
Support is incomplete for `leak_ip_address_to_all_servers` (will only ping the first address of each server) and for the `leak_ip` setting (which will also only ping the first address of each server).
23 lines
621 B
C++
23 lines
621 B
C++
#ifndef ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
|
|
#define ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
|
|
#include <base/system.h>
|
|
|
|
class IConsole;
|
|
class IStorage;
|
|
|
|
class IServerBrowserPingCache
|
|
{
|
|
public:
|
|
virtual ~IServerBrowserPingCache() {}
|
|
|
|
virtual void Load() = 0;
|
|
|
|
virtual int NumEntries() const = 0;
|
|
virtual void CachePing(const NETADDR &Addr, int Ping) = 0;
|
|
// Returns -1 if the ping isn't cached.
|
|
virtual int GetPing(const NETADDR *pAddrs, int NumAddrs) const = 0;
|
|
};
|
|
|
|
IServerBrowserPingCache *CreateServerBrowserPingCache(IConsole *pConsole, IStorage *pStorage);
|
|
#endif // ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
|