Network code cleanup
This commit is contained in:
parent
6370d71ebe
commit
95ef32c913
2 changed files with 109 additions and 85 deletions
|
@ -39,20 +39,20 @@ public:
|
|||
protected:
|
||||
|
||||
protected:
|
||||
int64_t submit(const JobResult& result) override;
|
||||
int64_t submit(const JobResult &result) override;
|
||||
void login() override;
|
||||
void onClose() override;
|
||||
|
||||
bool handleResponse(int64_t id, const rapidjson::Value& result, const rapidjson::Value& error) override;
|
||||
bool handleResponse(int64_t id, const rapidjson::Value &result, const rapidjson::Value &error) override;
|
||||
void parseNotification(const char *method, const rapidjson::Value ¶ms, const rapidjson::Value &error) override;
|
||||
|
||||
bool disconnect() override;
|
||||
|
||||
private:
|
||||
const char *errorMessage(const rapidjson::Value &error) const;
|
||||
uint64_t extraNonce(const rapidjson::Value &result) const;
|
||||
uint64_t target(const rapidjson::Value ¶ms) const;
|
||||
void authorize();
|
||||
void onAuthorizeResponse(const rapidjson::Value& result, bool success, uint64_t elapsed);
|
||||
void onSubscribeResponse(const rapidjson::Value& result, bool success, uint64_t elapsed);
|
||||
void onAuthorizeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
||||
void onSubscribeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
||||
void setTarget(const rapidjson::Value ¶ms);
|
||||
void subscribe();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue