2010-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Enter 'end game' mode from the beginning when getting torrent
	metadata for quick data retrieval.
	* src/HandshakeExtensionMessage.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-11-18 12:10:15 +00:00
parent 1eef862cc3
commit 698876e2eb
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2010-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Enter 'end game' mode from the beginning when getting torrent
metadata for quick data retrieval.
* src/HandshakeExtensionMessage.cc
2010-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced BNode with DHTBucketTreeNode which is 2 times efficient.

View File

@ -137,6 +137,9 @@ void HandshakeExtensionMessage::doReceivedAction()
SharedHandle<PieceStorage> pieceStorage =
dctx_->getOwnerRequestGroup()->getPieceStorage();
// We enter 'end game' mode from the start to get metadata
// quickly.
pieceStorage->enterEndGame();
peer_->reconfigureSessionResource(dctx_->getPieceLength(),
dctx_->getTotalLength());
peer_->setAllBitfield();