Tatsuhiro Tsujikawa
07d270c87e
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
8b0c701266
Removed trailing spaces
2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa
7989cd898d
Use int or int32_t instead of size_t where suitable
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
c58f736bb9
BtRegistry now holds BitTorrent TCP server port.
...
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.
2011-07-21 23:42:41 +09:00
Tatsuhiro Tsujikawa
2b458da480
2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Made #include guard consistent for c++ header files.
2010-10-31 07:23:53 +00:00
Tatsuhiro Tsujikawa
4db349c1f3
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
5699b67526
2009-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Rewritten DownloadContext and removed SingleFileDownloadContext
and BtContext and its derived classes. BitTorrent specific
attributes are now set by DownloadContext::setAttribute() with key
bittorrent::BITTORRENT.
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/AbstractCommand.cc
* src/AbstractCommand.h
* src/AbstractProxyRequestCommand.cc
* src/AbstractProxyResponseCommand.cc
* src/ActivePeerConnectionCommand.cc
* src/ActivePeerConnectionCommand.h
* src/AnnounceList.cc
* src/BtCheckIntegrityEntry.cc
* src/BtConstants.h
* src/BtContext.h: Removed
* src/BtDependency.cc
* src/BtExtendedMessage.cc
* src/BtPieceMessage.cc
* src/BtPieceMessage.h
* src/BtPostDownloadHandler.cc
* src/BtRegistry.cc
* src/BtRegistry.h
* src/BtSetup.cc
* src/CheckIntegrityCommand.cc
* src/CheckIntegrityEntry.cc
* src/ChecksumCheckIntegrityEntry.cc
* src/ConsoleStatCalc.cc
* src/ContentTypeRequestGroupCriteria.cc
* src/DHTGetPeersCommand.cc
* src/DHTGetPeersCommand.h
* src/DHTPeerLookupTask.cc
* src/DHTPeerLookupTask.h
* src/DHTTaskFactory.h
* src/DHTTaskFactoryImpl.cc
* src/DHTTaskFactoryImpl.h
* src/DefaultBtAnnounce.cc
* src/DefaultBtAnnounce.h
* src/DefaultBtContext.cc: Removed
* src/DefaultBtContext.h: Removed
* src/DefaultBtInteractive.cc
* src/DefaultBtInteractive.h
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtMessageDispatcher.h
* src/DefaultBtMessageFactory.cc
* src/DefaultBtMessageFactory.h
* src/DefaultBtMessageReceiver.cc
* src/DefaultBtMessageReceiver.h
* src/DefaultBtProgressInfoFile.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultBtRequestFactory.h
* src/DefaultExtensionMessageFactory.cc
* src/DefaultExtensionMessageFactory.h
* src/DefaultPeerStorage.cc
* src/DefaultPeerStorage.h
* src/DefaultPieceStorage.cc
* src/DefaultSegmentManFactory.cc
* src/DiskAdaptor.cc
* src/DiskAdaptor.h
* src/DownloadContext.cc
* src/DownloadContext.h
* src/DownloadEngine.cc
* src/DownloadEngineFactory.cc
* src/DownloadHandler.cc
* src/DownloadResult.h
* src/FileAllocationCommand.cc
* src/FileAllocationDispatcherCommand.cc
* src/FileAllocationEntry.cc
* src/FileEntry.h
* src/FillRequestGroupCommand.cc
* src/FtpDownloadCommand.cc
* src/FtpFinishDownloadCommand.cc
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/FtpTunnelRequestCommand.cc
* src/FtpTunnelResponseCommand.cc
* src/HandshakeExtensionMessage.cc
* src/HandshakeExtensionMessage.h
* src/HaveEraseCommand.cc
* src/HttpDownloadCommand.cc
* src/HttpInitiateConnectionCommand.cc
* src/HttpProxyRequestCommand.cc
* src/HttpProxyResponseCommand.cc
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/HttpResponseCommand.cc
* src/HttpServerBodyCommand.cc
* src/HttpServerCommand.cc
* src/HttpSkipResponseCommand.cc
* src/InitiateConnectionCommandFactory.cc
* src/InitiatorMSEHandshakeCommand.cc
* src/InitiatorMSEHandshakeCommand.h
* src/IteratableChecksumValidator.cc
* src/IteratableChecksumValidator.h
* src/IteratableChunkChecksumValidator.cc
* src/MSEHandshake.cc
* src/MSEHandshake.h
* src/Makefile.am
* src/Makefile.in
* src/Metalink2RequestGroup.cc
* src/MetalinkPostDownloadHandler.cc
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
* src/MultiFileAllocationIterator.cc
* src/MultiUrlRequestInfo.cc
* src/PeerChokeCommand.cc
* src/PeerChokeCommand.h
* src/PeerInitiateConnectionCommand.cc
* src/PeerInitiateConnectionCommand.h
* src/PeerInteractionCommand.cc
* src/PeerInteractionCommand.h
* src/PeerReceiveHandshakeCommand.cc
* src/PieceHashCheckIntegrityEntry.cc
* src/RealtimeCommand.cc
* src/ReceiverMSEHandshakeCommand.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupEntry.cc
* src/RequestGroupMan.cc
* src/SeedCheckCommand.cc
* src/SeedCheckCommand.h
* src/SegmentMan.cc
* src/ShareRatioSeedCriteria.h
* src/SingleFileDownloadContext.cc: Removed
* src/SingleFileDownloadContext.h: Removed
* src/SleepCommand.cc
* src/StreamCheckIntegrityEntry.cc
* src/TrackerWatcherCommand.cc
* src/TrackerWatcherCommand.h
* src/UnknownLengthPieceStorage.cc
* src/Util.cc
* src/Util.h
* src/XmlRpcMethodImpl.cc
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* src/download_helper.cc
* src/main.cc
* src/option_processing.cc
* test/BitfieldManTest.cc
* test/BittorrentHelperTest.cc
* test/BtCancelMessageTest.cc
* test/BtChokeMessageTest.cc
* test/BtDependencyTest.cc
* test/BtPieceMessageTest.cc
* test/BtPostDownloadHandlerTest.cc
* test/BtRegistryTest.cc
* test/BtRejectMessageTest.cc
* test/BtRequestMessageTest.cc
* test/DHTPeerAnnounceStorageTest.cc
* test/DefaultBtAnnounceTest.cc
* test/DefaultBtContextTest.cc: Removed
* test/DefaultBtMessageDispatcherTest.cc
* test/DefaultBtMessageFactoryTest.cc
* test/DefaultBtProgressInfoFileTest.cc
* test/DefaultBtRequestFactoryTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/DefaultPeerStorageTest.cc
* test/DefaultPieceStorageTest.cc
* test/DirectDiskAdaptorTest.cc
* test/DownloadContextTest.cc
* test/DownloadHandlerFactoryTest.cc
* test/DownloadHelperTest.cc
* test/HandshakeExtensionMessageTest.cc
* test/HttpRequestTest.cc
* test/HttpResponseTest.cc
* test/IteratableChecksumValidatorTest.cc
* test/IteratableChunkChecksumValidatorTest.cc
* test/MSEHandshakeTest.cc
* test/Makefile.am
* test/Makefile.in
* test/Metalink2RequestGroupTest.cc
* test/MetalinkPostDownloadHandlerTest.cc
* test/MockBtContext.h: Removed
* test/MockDHTTaskFactory.h
* test/MockDownloadContext.h: Removed
* test/MockPieceStorage.h
* test/MultiDiskAdaptorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/RequestGroupManTest.cc
* test/RequestGroupTest.cc
* test/SegmentManTest.cc
* test/ShareRatioSeedCriteriaTest.cc
* test/SingleFileDownloadContextTest.cc: Removed
* test/UtilTest.cc
* test/XmlRpcMethodTest.cc
2009-06-28 10:37:15 +00:00
Tatsuhiro Tsujikawa
7cf589e784
2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Made BtRegistry non-static object. Now DownloadEngine has a
reference to its object.
* src/AbstractBtMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/ActivePeerConnectionCommand.h
* src/BtContextAwareCommand.cc
* src/BtContextAwareCommand.h
* src/BtExtendedMessage.cc
* src/BtExtendedMessage.h
* src/BtInterestedMessage.cc
* src/BtInterestedMessage.h
* src/BtNotInterestedMessage.cc
* src/BtNotInterestedMessage.h
* src/BtRegistry.cc
* src/BtRegistry.h
* src/BtSeederStateChoke.cc
* src/BtSetup.cc
* src/DHTGetPeersCommand.cc
* src/DHTGetPeersCommand.h
* src/DHTPeerAnnounceEntry.cc
* src/DHTPeerAnnounceEntry.h
* src/DHTPeerAnnounceStorage.cc
* src/DHTPeerAnnounceStorage.h
* src/DHTPeerLookupTask.cc
* src/DHTPeerLookupTask.h
* src/DHTSetup.cc
* src/DHTSetup.h
* src/DHTTaskFactory.h
* src/DHTTaskFactoryImpl.cc
* src/DHTTaskFactoryImpl.h
* src/DefaultBtAnnounce.cc
* src/DefaultBtInteractive.cc
* src/DefaultBtInteractive.h
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtMessageDispatcher.h
* src/DefaultBtMessageFactory.cc
* src/DefaultBtMessageFactory.h
* src/DefaultBtMessageReceiver.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultBtProgressInfoFile.h
* src/DefaultBtRequestFactory.cc
* src/DefaultBtRequestFactory.h
* src/DefaultExtensionMessageFactory.cc
* src/DefaultExtensionMessageFactory.h
* src/DefaultPeerStorage.cc
* src/DefaultPeerStorage.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/InitiatorMSEHandshakeCommand.cc
* src/InitiatorMSEHandshakeCommand.h
* src/MSEHandshake.cc
* src/MSEHandshake.h
* src/Makefile.am
* src/Makefile.in
* src/PeerChokeCommand.cc
* src/PeerChokeCommand.h
* src/PeerInitiateConnectionCommand.cc
* src/PeerInitiateConnectionCommand.h
* src/PeerInteractionCommand.cc
* src/PeerInteractionCommand.h
* src/PeerObject.h
* src/PeerReceiveHandshakeCommand.cc
* src/PeerReceiveHandshakeCommand.h
* src/ReceiverMSEHandshakeCommand.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/SeedCheckCommand.cc
* src/SeedCheckCommand.h
* src/ShareRatioSeedCriteria.h
* src/SimpleBtMessage.cc
* src/TrackerWatcherCommand.cc
* src/TrackerWatcherCommand.h
* src/UTPexExtensionMessage.cc
* src/UTPexExtensionMessage.h
* test/BtCancelMessageTest.cc
* test/BtChokeMessageTest.cc
* test/BtExtendedMessageTest.cc
* test/BtInterestedMessageTest.cc
* test/BtNotInterestedMessageTest.cc
* test/BtPieceMessageTest.cc
* test/BtPortMessageTest.cc
* test/BtRegistryTest.cc
* test/BtRejectMessageTest.cc
* test/BtRequestMessageTest.cc
* test/DHTPeerAnnounceEntryTest.cc
* test/DHTPeerAnnounceStorageTest.cc
* test/DefaultBtMessageDispatcherTest.cc
* test/DefaultBtMessageFactoryTest.cc
* test/DefaultBtProgressInfoFileTest.cc
* test/DefaultBtRequestFactoryTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/MSEHandshakeTest.cc
* test/MockDHTTaskFactory.h
* test/ShareRatioSeedCriteriaTest.cc
* test/UTPexExtensionMessageTest.cc
2008-11-03 06:49:02 +00:00
Tatsuhiro Tsujikawa
3505201f33
2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
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-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
1b7c198289
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Removed "using namespace std;" from all sources. Appended std::
prefix to c++
standard classes.
Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa
0f13363229
2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Added DHT functionality, compatible with mainline.
DHT is disabled by default. To enable it, give --enable-dht to
aria2c.
You may need to specify entry point to DHT network using
--dht-entry-point. DHT uses UDP port to listen incoming message.
Use --dht-listen-port to specify port number. Make sure that
your
firewall configuration can pass through UDP traffic to the port.
The routing table is saved in $HOME/.aria2/dht.dat.
* src/DHT*
* src/BNode.{h, cc}
* src/PeerInteractionCommand.cc: enable DHT functionality for a
particular torrent.
* src/Data.cc: Rewritten ctor.
* src/OptionHandlerFactory.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/DefaultBtInteractive.cc: Send port message if dht is
enabled.
* src/RequestGroup.cc: Initialize DHT functionality. When
download
ends, remove BtContext from DHTPeerAnnounceStorage.
* src/BtPortMessage.{h, cc}: Rewritten.
* src/message.h
* src/OptionHandlerImpl.cc
* src/option_processing.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/Dictionary.{h, cc} (remove): New function.
* src/prefs.h
* src/DefaultBtMessageFactory.h
* src/BtHandshakeMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/SocketCore.{h, cc}: Added datagram socket support.
* src/DefaultBtMessageFactory.cc
* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
Create DHT commands.
* src/BtMessageFactory.h
* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00