mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-12 09:42:50 -05:00
Added DNS config.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#define XMRIG_DNS_H
|
||||
|
||||
|
||||
#include "base/net/dns/DnsConfig.h"
|
||||
#include "base/tools/String.h"
|
||||
|
||||
|
||||
@@ -30,6 +31,7 @@
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class DnsConfig;
|
||||
class DnsRequest;
|
||||
class IDnsBackend;
|
||||
class IDnsListener;
|
||||
@@ -38,9 +40,13 @@ class IDnsListener;
|
||||
class Dns
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<DnsRequest> resolve(const String &host, IDnsListener *listener, uint64_t ttl = 60000);
|
||||
inline static const DnsConfig &config() { return m_config; }
|
||||
inline static void set(const DnsConfig &config) { m_config = config; }
|
||||
|
||||
static std::shared_ptr<DnsRequest> resolve(const String &host, IDnsListener *listener, uint64_t ttl = 0);
|
||||
|
||||
private:
|
||||
static DnsConfig m_config;
|
||||
static std::map<String, std::shared_ptr<IDnsBackend> > m_backends;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user