/* */ #ifndef _D_PEER_CHOKE_COMMAND_H_ #define _D_PEER_CHOKE_COMMAND_H_ #include "Command.h" #include "BtContextAwareCommand.h" #include "DownloadEngine.h" #include "TimeA2.h" #include "RequestGroupAware.h" class PeerChokeCommand : public Command, public BtContextAwareCommand, public RequestGroupAware { private: int32_t interval; DownloadEngine* e; int32_t rotate; Time checkPoint; void orderByUploadRate(Peers& peers) const; void orderByDownloadRate(Peers& peers) const; void optUnchokingPeer(Peers& peers) const; public: PeerChokeCommand(int32_t cuid, RequestGroup* requestGroup, DownloadEngine* e, const BtContextHandle& btContext, int32_t interval); virtual ~PeerChokeCommand(); virtual bool execute(); }; #endif // _D_PEER_CHOKE_COMMAND_H_