2021-04-17 14:05:24 +00:00
|
|
|
#ifndef ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
|
|
|
|
#define ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
|
2023-12-11 14:40:09 +00:00
|
|
|
#include <base/types.h>
|
2021-04-17 14:05:24 +00:00
|
|
|
|
|
|
|
class IConsole;
|
|
|
|
class IStorage;
|
|
|
|
|
|
|
|
class IServerBrowserPingCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~IServerBrowserPingCache() {}
|
|
|
|
|
|
|
|
virtual void Load() = 0;
|
|
|
|
|
2022-05-23 18:16:18 +00:00
|
|
|
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;
|
2021-04-17 14:05:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
IServerBrowserPingCache *CreateServerBrowserPingCache(IConsole *pConsole, IStorage *pStorage);
|
|
|
|
#endif // ENGINE_CLIENT_SERVERBROWSER_PING_CACHE_H
|