Added HttpClient class.
This commit is contained in:
parent
35d868fb48
commit
241383068c
17 changed files with 421 additions and 153 deletions
|
@ -144,7 +144,11 @@ void xmrig::Dns::onResolved(int status, addrinfo *res)
|
|||
ptr = ptr->ai_next;
|
||||
}
|
||||
|
||||
m_listener->onResolved(*this, status);
|
||||
if (isEmpty()) {
|
||||
m_status = UV_EAI_NONAME;
|
||||
}
|
||||
|
||||
m_listener->onResolved(*this, m_status);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,8 +47,9 @@ public:
|
|||
Dns(IDnsListener *listener);
|
||||
~Dns();
|
||||
|
||||
inline bool isEmpty() const { return m_ipv4.empty() && m_ipv6.empty(); }
|
||||
inline int status() const { return m_status; }
|
||||
inline bool isEmpty() const { return m_ipv4.empty() && m_ipv6.empty(); }
|
||||
inline const String &host() const { return m_host; }
|
||||
inline int status() const { return m_status; }
|
||||
|
||||
bool resolve(const String &host);
|
||||
const char *error() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue