summaryrefslogtreecommitdiff
path: root/src/DefaultPeerListProcessor.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2009-04-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-04-231-77/+0
| | | | | | | | | | | | | | | | | | | Rewritten PeerListProcessor * src/PeerListProcessor.h * src/CompactPeerListProcessor.h: Removed * src/CompactPeerListProcessor.cc: Removed * src/DelegatingPeerListProcessor.cc: Removed. * src/DefaultBtAnnounce.cc * src/Makefile.am * src/UTPexExtensionMessage.cc * src/DefaultPeerListProcessor.h: Removed. * src/DefaultPeerListProcessor.cc: Removed. * src/DelegatingPeerListProcessor.h: Removed. * test/Makefile.am * test/PeerListProcessorTest.cc * test/DefaultPeerListProcessorTest.cc: Removed.
* 2008-12-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-12-091-19/+16
| | | | | | | | | | | | | | | | | | | | | Use BDE instead of Dictionary/List/Data classes. * src/CompactPeerListProcessor.cc * src/CompactPeerListProcessor.h * src/DefaultBtAnnounce.cc * src/DefaultBtContext.cc * src/DefaultBtContext.h * src/DefaultPeerListProcessor.cc * src/DefaultPeerListProcessor.h * src/DelegatingPeerListProcessor.cc * src/DelegatingPeerListProcessor.h * src/PeerListProcessor.h * src/UTPexExtensionMessage.cc * src/Util.h * src/message.h * test/DefaultBtContextTest.cc * test/DefaultPeerListProcessorTest.cc
* 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-141-2/+6
| | | | | | | | | | Defined static const std::string IP("ip"), PORT("port") and use them instead of string literals. * src/DefaultPeerListProcessor.cc * src/DefaultPeerListProcessor.h
* 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-121-4/+4
| | | | | | | | | | | | | | | | | Changed method signature: PeerListProcessor::extractPeer * src/CompactPeerListProcessor.cc * src/CompactPeerListProcessor.h * src/DefaultBtAnnounce.cc * src/DefaultPeerListProcessor.cc * src/DefaultPeerListProcessor.h * src/DelegatingPeerListProcessor.cc * src/DelegatingPeerListProcessor.h * src/PeerListProcessor.h * src/UTPexExtensionMessage.cc * test/DefaultPeerListProcessorTest.cc
* 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-201-1/+1
| | | | | | | | | | | | | | | Rewritten SharedHandle. Now copy constructor taking raw pointer has keyword explicit and SharedHandle's default constructor initializes its internal obj to null, old implementation initializes it using obj's default constructor. To assign null, write SharedHandle<T> x(...); x.reset(); TODO: test/SharedHandleTest.cc needs more tests. * src/SharedHandle.h
* 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-091-3/+1
| | | | | | type cleanup for allmost all remaining files.
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-2/+13
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-12-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allocate bitfield in Peer when it is really used. More specifically, bitfield in Peer is allocated after the connection is established and deallocated when the connection is dropped. Since 2 parameters(piece length and total length) was removed from the constructor of Peer class, many test classes were modified accordingly. See svn log for more detailed information. * src/PeerInteractionCommand.cc * src/CompactPeerListProcessor.cc * src/Peer.cc * src/DefaultPeerListProcessor.cc * src/PeerListenCommand.cc * src/PeerReceiveHandshakeCommand.cc Fixed memory leak * src/Piece.cc
* 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-07-211-4/+2
| | | | | | | Converted int's to in32_t. long long int's are also converted to int64_t
* 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2006-10-011-0/+70
To add timeout to async name resolution: * src/AbstractCommand.h (nameResolveFinished): New function. This is not elegant way. It needs to be more refined. (nameResolverCheck): New variable. * src/AbstractCommand.cc (AbstractCommand): Added nameResolverCheck. (execute): Added the check whether the name resolution has finished. (setNameResolverCheck): Set nameResolverCheck to true. (disableNameResolverCheck): Set nameResolverCheck to false. (nameResolverFinished): New function. * src/FtpInitiateConnectionCommand.h (nameResolverFinished): New function. * src/HttpInitiateConnectionCommand.h (nameResolverFinished): New function. To add the support for a non-compact response from a tracker: * src/PeerListProcessor.h: New class. * src/DefaultPeerListProcessor.h: New class. * src/DefaultPeerListProcessor.cc: New class. * src/CompactPeerListProcessor.h: New class. * src/CompactPeerListProcessor.cc: New class. * src/DelegatingPeerListProcessor.h: New class. * src/DelegatingPeerListProcessor.cc: New class. * src/TorrentMan.cc (addPeer): New function(overload). (addPeer): Delete unused peers only when new peer is added. * src/TorrentMan.h (PeerListProcessor.h): Included. (Peers): Removed. (addPeer): New function(overload). * src/TrackerUpdateCommand.cc (netinet/in.h): Removed. (DelegatingPeerListProcessor.h): Included. (execute): Updated to use DelegatingPeerListProcessor. To fix the memory leak in TorrentMan::peers: * src/PeerAbstractCommand.cc (onAbort): Added peer->resetStatus(). * src/Peer.h (resetStatus): Made public. To improve the precision of the speed calculation: * src/SpeedCalc.h (nextInterval): New variable. * src/SpeedCalc.cc (reset): Added nextInterval. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC. (changeSw): Set nextInterval to 15 seconds relative to the current instant time. * src/main.cc (showVersion): Updated.