summaryrefslogtreecommitdiff
path: root/src/DefaultBtInteractive.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use default where possibleNils Maier2016-08-291-1/+1
|
* Change have entry indexing methodTatsuhiro Tsujikawa2016-07-101-4/+4
| | | | Now use increasing sequence of integer rather than timer value.
* Decide interest and choking after receiving messagesTatsuhiro Tsujikawa2016-07-101-4/+4
|
* Send have message without too much delayTatsuhiro Tsujikawa2016-07-091-25/+16
| | | | | | Also send bitfield rather than have messages if bitfield message is equal to or less than the sum of have messages which otherwise would be sent.
* Fix frequent interested/not interested message transmissionTatsuhiro Tsujikawa2016-07-091-0/+2
|
* Fix frequent choke/unchoke message transmissionTatsuhiro Tsujikawa2016-07-091-0/+3
|
* Remove PeerStorage:scheduleForcedChokeRound since it is not effectiveTatsuhiro Tsujikawa2016-06-041-1/+0
|
* Fasten seed/download on fast connectionTatsuhiro Tsujikawa2016-06-021-0/+1
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-241/+261
|
* Use user-defined literals for time unitsTatsuhiro Tsujikawa2015-06-211-6/+4
|
* Replace timer facility with chrono libTatsuhiro Tsujikawa2015-06-091-8/+17
|
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* bittorrent::computeFastSet: Return std::vectorTatsuhiro Tsujikawa2014-06-041-5/+5
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-2/+2
| | | | Courtesy of llvm cpp11-migrate 3.3
* Refactor PeerInterationCommand ctorTatsuhiro Tsujikawa2013-07-061-10/+28
|
* Use std::unique_ptr to receive BtMessageTatsuhiro Tsujikawa2013-07-041-10/+10
|
* Return nullptr directly where std::shared_ptr is expectedTatsuhiro Tsujikawa2013-07-041-1/+1
| | | | | The constructor of std::shared_ptr which takes nullptr is not explicit so we can return nullptr directly.
* Use std::unique_ptr for ExtensionMessageTatsuhiro Tsujikawa2013-07-011-26/+19
|
* Wrap BtMessage objects by std::unique_ptr instead of std::shared_ptrTatsuhiro Tsujikawa2013-06-301-30/+33
|
* DownloadContext::attrs_ now holds std::unique_ptrTatsuhiro Tsujikawa2013-06-231-2/+1
| | | | DownloadContext::getAttribute() returns a raw pointer.
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-29/+29
|
* Remove PeerStorage::getActivePeers() and add getUsedPeers() insteadTatsuhiro Tsujikawa2013-01-261-10/+8
| | | | | PeerStorage::getUsedPeers() returns non-active peers, so caller must call Peer::isActive() to get active peers.
* Revert 53dde0a9Tatsuhiro Tsujikawa2013-01-151-20/+8
| | | | | Reverted to the original strategy, but some values are tweaked. Without TCP_NODELAY, 53dde0a9 does not work well.
* Remove reqNumToCreate constraint when creating requestTatsuhiro Tsujikawa2013-01-151-6/+0
| | | | It really degrades download speed.
* Download rate based strategy to increase outstanding requestTatsuhiro Tsujikawa2013-01-151-8/+21
| | | | | This strategy performs better than old one in high latency environment.
* Avoid tiny packet for Have and Request messageTatsuhiro Tsujikawa2013-01-141-12/+26
|
* Initialized memberTatsuhiro Tsujikawa2012-10-291-1/+2
|
* Initialized scalar membersTatsuhiro Tsujikawa2012-10-291-1/+2
|
* Reworked download/upload statistics calculationTatsuhiro Tsujikawa2012-10-251-2/+0
| | | | | | | | | | | | | | The old implementation calculates download/upload statistics for a RequestGroup by summing up all PeerStat objects. For global statistics, those are summed together. This clearly incurs runtime penalty and we introduced some kind of caching which updates statistics every 250ms but it did not work right. This change removes all these aggregation code, and instead makes RequestGroup and RequestGroupMan objects hold NetStat object and download/upload bytes are directly calculated by thier own NetStat. This is far more simplar than the old way and less runtime penalty and brings more accuracy.
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-3/+3
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-6/+6
|
* Rewritten ExtensionMessageRegistryTatsuhiro Tsujikawa2012-09-261-4/+7
|
* Use const char* instead of static const std::stringTatsuhiro Tsujikawa2012-09-241-2/+1
|
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-2/+2
|
* Process as many messages as possible in recv bufferTatsuhiro Tsujikawa2012-06-251-1/+1
|
* wallclock is now retrieved using global::wallclock() call.Tatsuhiro Tsujikawa2011-08-101-21/+21
| | | | | This is necessary to avoid global variable initialization order problem.
* BtRegistry now holds BitTorrent TCP server port.Tatsuhiro Tsujikawa2011-07-211-1/+1
| | | | | | | Because BitTorrent TCP server port is global configuration, it is not preferable that per download resource BtRuntime holds it. We also refactored and eliminated ugly static variable in PeerListenCommand. If TCP port is necessary, we inject it to them directly.
* Loosen the condition where maxOutstandingRequest_ is increased.Tatsuhiro Tsujikawa2011-07-181-1/+1
|
* Managed user cuid in Piece.Tatsuhiro Tsujikawa2011-07-161-6/+7
| | | | | | Previous implementation does not store information which Command cuid uses which Piece. Mark Piece acquired by SegmentMan by setting Piece::setUsedBySegment(true).
* Drop connection if client and peer are both seeders.Tatsuhiro Tsujikawa2011-01-071-0/+4
|
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-11/+11
| | | | | | | | Use format specifier %lld for cuid_t. Defined cuid_t as long long int instead of int64_t, since g++ complains int64_t is not suitable for %lld.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-12/+9
| | | | | | Replaced StringFormat with fmt
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-48/+32
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-6/+7
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-10-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed compiler warning about printf format. * src/AdaptiveURISelector.cc * src/BtPieceMessage.cc * src/DHTAbstractNodeLookupTask.h * src/DHTMessageFactoryImpl.cc * src/DHTPeerLookupTask.cc * src/DHTReplaceNodeTask.cc * src/DefaultBtAnnounce.cc * src/DefaultBtInteractive.cc * src/DefaultBtMessageDispatcher.cc * src/DefaultBtProgressInfoFile.cc * src/DefaultBtRequestFactory.cc * src/DefaultExtensionMessageFactory.cc * src/DefaultPieceStorage.cc * src/DownloadCommand.cc * src/FileAllocationCommand.cc * src/FileEntry.cc * src/HandshakeExtensionMessage.cc * src/IteratableChunkChecksumValidator.cc * src/LibgcryptDHKeyExchange.h * src/LibsslDHKeyExchange.h * src/LpdDispatchMessageCommand.cc * src/MSEHandshake.cc * src/MessageDigestHelper.cc * src/MultiDiskAdaptor.cc * src/PeerConnection.cc * src/SegmentMan.cc * src/TimedHaltCommand.cc * src/UTMetadataRequestExtensionMessage.cc * src/UTPexExtensionMessage.cc * src/bencode2.cc * src/bittorrent_helper.cc * src/message.h
* 2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-291-28/+27
| | | | | | | | | | | | | | | | Added a sets of overloaded functions for PieceStorage::getMissingPiece() and getMissingFastPiece() to get multiple pieces more efficiently. * src/DefaultBtInteractive.cc * src/DefaultPieceStorage.cc * src/DefaultPieceStorage.h * src/PieceStorage.h * src/UnknownLengthPieceStorage.cc * src/UnknownLengthPieceStorage.h * test/DefaultPieceStorageTest.cc * test/MockPieceStorage.h
* 2010-08-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-271-1/+0
| | | | | | | Removed unused debug log. * src/DefaultBtInteractive.cc
* 2010-08-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-261-1/+9
| | | | | | | | | | | | | Enter end game mode as soon as all pieces are assigned to peer to avoid substantial slow down at the very last stage of download. * src/DefaultBtInteractive.cc * src/DefaultPieceStorage.cc * src/DefaultPieceStorage.h * src/PieceStorage.h * src/UnknownLengthPieceStorage.h * test/MockPieceStorage.h
* 2010-08-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-251-4/+5
| | | | | | | | Set max outstanding request size to 100. Set stepping to 6. * src/BtConstants.h * src/DefaultBtInteractive.cc
* 2010-08-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | Add only gracefully disconnected peer to ut_pex dropped list. Add incoming dropped list to PeerStorage. * src/DefaultBtInteractive.cc * src/DefaultPeerStorage.cc * src/InitiatorMSEHandshakeCommand.cc * src/Peer.cc * src/Peer.h * src/PeerConnection.cc * src/PeerConnection.h * src/PeerInteractionCommand.cc * src/PeerReceiveHandshakeCommand.cc * src/ReceiverMSEHandshakeCommand.cc * src/UTPexExtensionMessage.cc * test/DefaultPeerStorageTest.cc * test/UTPexExtensionMessageTest.cc