diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-13 01:25:36 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-13 01:25:36 +0000 |
| commit | d13c416a945c996316b314999d73511ea3b1ab8a (patch) | |
| tree | 6e21903df5ea2aa47b1c68cd9f01da82524e25ee /src/PeerSessionResource.h | |
| parent | 8b91d22ca43b65eff39944fd1fa02d248bc120c9 (diff) | |
2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten choking algorithm.
* src/PeerChokeCommand.{cc, h}
* src/BtInterestedMessage.cc
* src/PeerSessionResource.{cc, h}
* src/DefaultPeerStorage.{cc, h}
* src/BtNotInterestedMessage.cc
* src/DefaultBtMessageDispatcher.{cc, h}
* src/BtMessageDispatcher.h
* src/Peer.{cc, h}
* src/BtLeecherStateChoke.{cc, h}
* src/BtSetup.cc
* src/BtSeederStateChoke.{cc, h}
* src/PeerStorage.h
* test/MockPeerStorage.h
* test/MockBtMessageDispatcher.h
Diffstat (limited to 'src/PeerSessionResource.h')
| -rw-r--r-- | src/PeerSessionResource.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/PeerSessionResource.h b/src/PeerSessionResource.h index 465aba80..c4897bcd 100644 --- a/src/PeerSessionResource.h +++ b/src/PeerSessionResource.h @@ -38,6 +38,7 @@ #include "common.h" #include "BtConstants.h" #include "PeerStat.h" +#include "TimeA2.h" #include <string> #include <deque> @@ -76,6 +77,10 @@ private: uint64_t _uploadLength; uint64_t _downloadLength; + Time _lastDownloadUpdate; + + Time _lastAmUnchoking; + template<typename T> bool indexIncluded(const std::deque<T>& c, T index) const; public: @@ -179,6 +184,10 @@ public: uint64_t downloadLength() const; void updateDownloadLength(size_t bytes); + + const Time& getLastDownloadUpdate() const; + + const Time& getLastAmUnchoking() const; }; } // namespace aria2 |
