mirror of
https://github.com/aria2/aria2.git
synced 2024-12-12 08:17:17 +00:00
b8737b0e7c
To simplify TrackerWatherCommand, TrackerUpdateCommand and make the process of announce request testable. * src/TrackerWatcherCommand.h (TimeA2.h): Removed. (interval): Removed. (checkPoint): Removed. (createRequestCommand): Added an argument 'url'. (TrackerWatherCommand): Removed interval. (createCommand): New function. * src/DownloadEngineFactory.cc (newTorrentConsoleEngine): Updated according to the changes in TrackerWatherCommand. * src/TorrentMan.cc (DelegatingPeerListProcessor.h): New includes. (TorrentMan): Added the initialization of announceInterval. (isStoppedAnnounceReady): New function. (isCompletedAnnounceReady): New function. (isDefaultAnnounceReady): New function. (isAnnounceReady): New function. (getAnnounceUrl): New function. (announceStart): New function. (announceFailure): New function. (announceSuccess): New function. (isAllAnnounceFailed): New function. (resetAnnounce): New function. (processAnnounceResponse): New function. (needMorePeerConnection): New function. (noMoreAnnounce): New function. * src/TrackerUpdateCommand.h (getTrackerResponse): int->size_t * src/TorrentMan.h (isStoppedAnnounceReady): New function. (isCompletedAnnounceReady): New function. (isDefaultAnnounceReady): New function. (announceInterval): New variable. (isAnnounceReady): New function. (getAnnounceUrl): New function. (announceStart): New function. (announceFailure): New function. (announceSuccess): New function. (isAllAnnounceFailed): New function. (resetAnnounce): New function. (processAnnounceResponse): New function. (needMorePeerConnection): New function. (noMoreAnnounce): New function. * src/TrackerWatcherCommand.cc (TrackerWatherCommand): Removed interval and checkPoint. (execute): Rewritten. (createCommand): New function. (createRequestCommand): Rewritten. * src/TrackerUpdateCommand.cc (MetaFileUtil.h): Removed. (DelegatingPeerListProcessor.h): Removed. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
1 line
401 B
Plaintext
1 line
401 B
Plaintext
d8:announce36:http://aria.rednoah.com/announce.php13:announce-listll15:http://tracker1el15:http://tracker2el15:http://tracker3ee7:comment17:REDNOAH.COM RULES13:creation datei1123456789e4:infod5:filesld6:lengthi284e4:pathl5:aria23:src6:aria2ceed6:lengthi100e4:pathl19:aria2-0.2.2.tar.bz2eee4:name10:aria2-test12:piece lengthi128e6:pieces60:AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCee |