Added send with callback.

This commit is contained in:
XMRig
2019-10-16 19:34:33 +07:00
parent ae557af840
commit f382cee3f9
9 changed files with 127 additions and 72 deletions

View File

@@ -122,7 +122,7 @@ bool xmrig::SelfSelectClient::parseResponse(int64_t id, rapidjson::Value &result
submitBlockTemplate(result);
m_listener->onJobReceived(this, m_job, rapidjson::Value{});
return true;
}
@@ -207,7 +207,9 @@ void xmrig::SelfSelectClient::submitBlockTemplate(rapidjson::Value &result)
JsonRequest::create(doc, sequence(), "block_template", params);
send(doc);
send(doc, [this](const rapidjson::Value &result, bool success, uint64_t elapsed) {
m_listener->onJobReceived(this, m_job, rapidjson::Value{});
});
}