Unify network strategies with upcoming proxy.
This commit is contained in:
parent
a2f747fb0c
commit
c46c019c83
10 changed files with 110 additions and 45 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue