Unify network strategies with upcoming proxy.

This commit is contained in:
XMRig 2018-03-17 05:03:14 +07:00
parent a2f747fb0c
commit c46c019c83
10 changed files with 110 additions and 45 deletions

View file

@ -37,13 +37,15 @@ class Url;
class SinglePoolStrategy : public IStrategy, public IClientListener
{
public:
SinglePoolStrategy(const Url *url, int retryPause, const char *agent, IStrategyListener *listener);
SinglePoolStrategy(const Url *url, int retryPause, IStrategyListener *listener);
~SinglePoolStrategy();
public:
inline bool isActive() const override { return m_active; }
int64_t submit(const JobResult &result) override;
void connect() override;
void release() override;
void resume() override;
void stop() override;
void tick(uint64_t now) override;
@ -56,6 +58,7 @@ protected:
private:
bool m_active;
bool m_release;
Client *m_client;
IStrategyListener *m_listener;
};