diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-06-29 15:18:21 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-06-29 15:18:21 +0000 |
| commit | c4d79d7160569bef82c4a67b267d78289b91e449 (patch) | |
| tree | 23d390e759271fa4a55b677d09ff0e23b0111a7d /src/Request.cc | |
| parent | e82f870fdc3c1a7fc2c0b66a9f623a5386ece3d6 (diff) | |
2009-06-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten PeerStat handling. In the previous implementation,
faster command tries to find slower command. In this new
implementation, slower command tries to find faster command.
PeerStat is now created in each HTTP/FTP request to get download
rate correctly. If the download range is small, the download rate
tends to small and this will occur at the later stage of download.
* src/AbstractCommand.cc
* src/DownloadCommand.cc
* src/FileEntry.cc
* src/FileEntry.h
* src/Request.cc
* src/Request.h
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/SegmentMan.cc
* src/SegmentMan.h
* test/SegmentManTest.cc
Diffstat (limited to 'src/Request.cc')
| -rw-r--r-- | src/Request.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Request.cc b/src/Request.cc index ca60cfe0..ee9d7c0a 100644 --- a/src/Request.cc +++ b/src/Request.cc @@ -244,4 +244,10 @@ void Request::setMaxPipelinedRequest(unsigned int num) _maxPipelinedRequest = num; } +const SharedHandle<PeerStat>& Request::initPeerStat() +{ + _peerStat.reset(new PeerStat(0, host, protocol)); + return _peerStat; +} + } // namespace aria2 |
