diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-09-21 06:56:54 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-09-21 06:56:54 +0000 |
| commit | 65e0ffe6caa5f3ad9b4ccf49045f9e7ed144ee07 (patch) | |
| tree | 404fd056564901d0433d49dda78ae03a0f4b6475 /src/DownloadCommand.h | |
| parent | 2fb9b5be9705560fd77b4244636bc2515e81f32c (diff) | |
2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/AbstractCommand.cc
(execute): Check whether the download has finished before
checking
socket status.
Return true if peerStat->getStatus() == REQUEST_IDLE.
Do not exit even if no segment is available.
* src/prefs.h
(PREF_STARTUP_IDLE_TIME): New definition.
* src/PeerInteractionCommand.cc
(executeInternal): Removed max speed limit. Because it performs
bad.
(receiveMessages): Added max speed limit. This was better than
above,
but still a little bit to be desired. Sometimes the download
speed
became much faster than I specified.
* src/SpeedCalc.h
(start): New variable.
(accumulatedLength): New variable.
(getAvgSpeed): New function.
* src/SpeedCalc.cc
(reset): Added start, accumulatedLength.
(update): Added calculation of an average speed.
(getAvgSpeed): New function.
* src/DownloadCommand.h
(sw): Removed.
* src/main.cc
(main): Added PREF_STARTUP_IDLE_TIME.
* src/PeerStat.h
(STATUS): Added REQUEST_IDLE.
(getMaxSpeed): Renamed as getMaxDownloadSpeed().
(getAvgDownloadSpeed): New function
(requestIdle): New function.
* src/SegmentMan.h
(SegmentEntryHandle): New type definition.
(SegmentEntries): Now holds SegmentEntryHandle.
(findSlowerSegmentEntry): New funtion.
* src/SegmentMan.cc
(save): Updated according to the changes in SegmentEntries.
(read): Updated according to the changes in SegmentEntries.
(FindSegmentEntryByIndex): Updated according to the changes in
SegmentEntries.
(FindSegmentEntryByCuid): Updated according to the changes in
SegmentEntries.
(checkoutSegment): Updated according to the changes in
SegmentEntries.
(onNullBitfield): Updated according to the changes in
SegmentEntries.
Renamed uitr as itr.
(findSlowerSegmentEntry): New function.
(getSegment): Updated according to the changes in
SegmentEntries.
Added the feature that cancels the segment with slow server and
fast
one takes it over.
(cancelSegment): Updated according to the changes in
SegmentEntries.
(getDownloadLength): Updated according to the changes in
SegmentEntries.
(init): Assigned 0 to bitfield after deleting it.
* src/DownloadCommand.cc
(STARTUP_IDLE_TIME): Removed.
(executeInternal): Use PREF_STARTUP_IDLE_TIME.
Diffstat (limited to 'src/DownloadCommand.h')
| -rw-r--r-- | src/DownloadCommand.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/DownloadCommand.h b/src/DownloadCommand.h index 68c6b291..44824658 100644 --- a/src/DownloadCommand.h +++ b/src/DownloadCommand.h @@ -30,7 +30,6 @@ using namespace std; class DownloadCommand : public AbstractCommand { private: - Time sw; long long int lastSize; protected: bool executeInternal(Segment& segment); |
