New DNS implementation.

This commit is contained in:
XMRig 2021-03-16 22:24:37 +07:00
parent 5b189696d7
commit 3e41bdc552
No known key found for this signature in database
GPG key ID: 446A53638BE94409
14 changed files with 357 additions and 121 deletions

View file

@ -32,7 +32,7 @@
namespace xmrig {
class Dns;
class DnsRequest;
class HttpClient : public HttpContext, public IDnsListener, public ITimerListener
@ -51,7 +51,7 @@ public:
bool connect();
protected:
void onResolved(const DnsRecords &records, int status) override;
void onResolved(const DnsRecords &records, int status, const char *error) override;
void onTimer(const Timer *timer) override;
virtual void handshake();
@ -65,7 +65,7 @@ private:
const char *m_tag;
FetchRequest m_req;
std::shared_ptr<Dns> m_dns;
std::shared_ptr<DnsRequest> m_dns;
std::shared_ptr<Timer> m_timer;
};