Tatsuhiro Tsujikawa
bfc54d0b9a
Save control file early
2017-03-02 22:54:11 +09:00
Tatsuhiro Tsujikawa
9eff8100ef
Refactor
2017-03-02 22:48:40 +09:00
Nils Maier
366e2e8f79
Use default where possible
2016-08-29 16:52:20 +02:00
Tatsuhiro Tsujikawa
8f51793b19
Add --max-mmap-limit option
...
Set the maximum file size to enable mmap (see --enable-mmap
option). The file size is determined by the sum of all files contained
in one download. For example, if a download contains 5 files, then
file size is the total size of those files. If file size is strictly
greater than the size specified in this option, mmap will be disabled.
2016-01-29 00:14:30 +09:00
Tatsuhiro Tsujikawa
b1132d6b10
make clang-format using clang-format-3.6
2015-12-27 18:40:08 +09:00
Tatsuhiro Tsujikawa
3974c1223b
Don't enable mmap if file allocation is disabled
...
Without file allocation, we cannot map file because file length could
be zero.
This could fix bug reported at GH-478
2015-11-12 22:42:24 +09:00
Tatsuhiro Tsujikawa
377eb0699f
Use std::begin and std::end
2015-06-11 23:51:41 +09:00
Tatsuhiro Tsujikawa
f72a303b8d
Add --bt-detach-seed-only option
...
This option excludes seed only downloads when counting concurrent
active downloads (-j option). This means that if -j3 is given and
this option is turned on and 3 downloads are active and one of those
enters seed mode, then it is excluded from active download count (thus
it becomes 2), and the next download waiting in queue gets started.
But be aware that seeding item is still recognized as active download
in RPC method.
2014-10-14 00:13:29 +09:00
Nils Maier
d8f44ef4f6
Convert most 0/NULL pointers to nullptr
...
Courtesy of llvm cpp11-migrate 3.3
2013-08-20 21:28:24 +02:00
Tatsuhiro Tsujikawa
fa9f3fb5a3
Wrap Command object in std::unique_ptr
2013-06-23 21:55:52 +09:00
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
c09a5a95f4
mingw32: Re-open files with read-only mode enabled on seeding
...
On Mingw32 build, if aria2 opens file with GENERIC_WRITE access right,
some programs cannot open the file aria2 is seeding. To avoid this
situation, re-open files with read-only enabled when seeding is about
to begin.
2012-12-24 23:03:19 +09:00
Tatsuhiro Tsujikawa
96720b297d
Added --enable-mmap option.
...
If this option is used, map files into memory using mmap(2). This
option is experimental.
2012-06-24 16:28:04 +09:00
Tatsuhiro Tsujikawa
1372ac51ad
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added .cc file for classes/structs that only provided by header
file. Defined non-POD classes' ctor, dtor in .cc file. Moved
implementation code in header file to .cc file for major
classes/strucsts.
2010-11-14 07:17:55 +00:00
Tatsuhiro Tsujikawa
8d2ca8e03c
2010-07-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed the bug that DownloadContext::resetDownloadStartTime() never
be called in downloads whose total length is unknown. This causes
avg speed in Download Results is always 0 for these downloads.
* src/RequestGroup.cc
* src/BtFileAllocationEntry.cc
* src/StreamFileAllocationEntry.cc
2010-07-10 07:34:20 +00:00
Tatsuhiro Tsujikawa
a68b29a31a
2010-06-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Made protected member variable private. Added accessor funcs.
* src/BtCheckIntegrityEntry.cc
* src/BtFileAllocationEntry.cc
* src/CheckIntegrityEntry.cc
* src/CheckIntegrityEntry.h
* src/ChecksumCheckIntegrityEntry.cc
* src/FileAllocationEntry.cc
* src/PieceHashCheckIntegrityEntry.cc
* src/RequestGroupEntry.h
* src/StreamCheckIntegrityEntry.cc
* src/StreamFileAllocationEntry.cc
2010-06-09 15:04:01 +00:00
Tatsuhiro Tsujikawa
7cd9b21937
2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Made public member variables of DownloadEngine private. Added
accessor funcs.
2010-06-08 14:11:36 +00:00
Tatsuhiro Tsujikawa
c342bde962
2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use vector instead of deque for containers which is used for
mostly read-only purpose.
2010-02-28 12:30:11 +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
24d258cf66
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Call RequestGroup::createNextCommandWithAdj() from
BtFileAllocationEntry if at least one FileEntry has URI. The
static function hasAssociatedUri in RequestGroup.cc is renamed as
isUriSuppliedForRequsetFileEntry() and placed in FileEntry.h.
* src/BtFileAllocationEntry.cc
* src/FileEntry.h
* src/RequestGroup.cc
2009-07-04 15:26:00 +00:00
Tatsuhiro Tsujikawa
4cb5468662
2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Now RequestGroup has its own copy of Option object. This will help
to give custom option for each RequestGroup.
addTorrentFile command now takes options.
* src/AbstractCommand.cc
* src/AbstractCommand.h
* src/AbstractProxyRequestCommand.cc
* src/ActivePeerConnectionCommand.cc
* src/ActivePeerConnectionCommand.h
* src/AdaptiveURISelector.cc
* src/BtCheckIntegrityEntry.cc
* src/BtDependency.cc
* src/BtDependency.h
* src/BtFileAllocationEntry.cc
* src/BtPostDownloadHandler.cc
* src/CheckIntegrityEntry.cc
* src/DownloadCommand.cc
* src/FtpDownloadCommand.cc
* src/FtpFinishDownloadCommand.cc
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/HttpInitiateConnectionCommand.cc
* src/HttpRequestCommand.cc
* src/HttpResponseCommand.cc
* src/HttpSkipResponseCommand.cc
* src/InitiateConnectionCommand.cc
* src/InitiateConnectionCommandFactory.cc
* src/InitiatorMSEHandshakeCommand.cc
* src/InitiatorMSEHandshakeCommand.h
* src/Metalink2RequestGroup.cc
* src/Metalink2RequestGroup.h
* src/MetalinkPostDownloadHandler.cc
* src/MultiUrlRequestInfo.cc
* src/MultiUrlRequestInfo.h
* src/PeerAbstractCommand.cc
* src/PeerInteractionCommand.cc
* src/PeerInteractionCommand.h
* src/PeerReceiveHandshakeCommand.cc
* src/PeerReceiveHandshakeCommand.h
* src/RequestGroup.cc
* src/RequestGroup.h
* src/TrackerWatcherCommand.cc
* src/TrackerWatcherCommand.h
* src/XmlRpcMethod.cc
* src/XmlRpcMethod.h
* src/XmlRpcMethodImpl.cc
* src/download_helper.cc
* src/download_helper.h
* src/main.cc
* test/BtDependencyTest.cc
* test/BtPostDownloadHandlerTest.cc
* test/DefaultBtMessageDispatcherTest.cc
* test/DownloadHandlerFactoryTest.cc
* test/DownloadHelperTest.cc
* test/Metalink2RequestGroupTest.cc
* test/MetalinkPostDownloadHandlerTest.cc
* test/RequestGroupManTest.cc
* test/RequestGroupTest.cc
2009-05-08 16:41:21 +00:00
Tatsuhiro Tsujikawa
bdff264d2c
2008-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Show an average download speed in Download results.
* src/BtFileAllocationEntry.cc
* src/DefaultPieceStorage.cc
* src/DownloadContext.cc
* src/DownloadContext.h
* src/DownloadResult.h
* src/RequestGroup.cc
* src/RequestGroupMan.cc
* src/StreamFileAllocationEntry.cc
2008-11-10 16:10:31 +00:00
Tatsuhiro Tsujikawa
825cfe7715
2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Pass std::deque<Command*> by reference to avoid unnecessary coping.
* src/AbstractCommand.cc
* src/BtCheckIntegrityEntry.cc
* src/BtCheckIntegrityEntry.h
* src/BtFileAllocationEntry.cc
* src/BtFileAllocationEntry.h
* src/BtSetup.cc
* src/BtSetup.h
* src/CheckIntegrityCommand.cc
* src/CheckIntegrityEntry.h
* src/ChecksumCheckIntegrityEntry.cc
* src/ChecksumCheckIntegrityEntry.h
* src/DHTSetup.cc
* src/DHTSetup.h
* src/DownloadEngine.cc
* src/FileAllocationCommand.cc
* src/FileAllocationEntry.h
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/StreamCheckIntegrityEntry.cc
* src/StreamCheckIntegrityEntry.h
* src/StreamFileAllocationEntry.cc
* src/StreamFileAllocationEntry.h
* src/TrackerWatcherCommand.cc
* src/a2functional.h
2008-05-11 09:36:39 +00:00
Tatsuhiro Tsujikawa
04a7052013
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Added std namespace to copy, remove_copy, back_inserter,
front_inserter.
* src/RequestGroupMan.cc
* src/DefaultPieceStorage.cc
* src/StreamFileAllocationEntry.cc
* src/BtFileAllocationEntry.cc
* src/RequestGroup.cc
* src/MetalinkEntry.cc
* src/DelegatingPeerListProcessor.cc
* src/DefaultBtRequestFactory.cc
* src/DefaultBtMessageDispatcher.cc
* src/version_usage.cc: Included <algorithm>
* src/main.cc
* src/MetalinkParserController.cc
* src/DefaultBtContext.cc
* src/DownloadEngineFactory.cc
* src/a2algo.h
Removed.
* test/StreamUriListParserTest.cc
2008-02-08 18:39:26 +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
355a91cdec
2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Fixed: compilation fails without c-ares/ares
* src/DownloadEngine.cc (addCommand): Moved outside #ifdef
Generate http/ftp commands only when download is incomplete.
* src/BtFileAllocationEntry.cc (prepareForNextAction)
2007-11-24 11:32:22 +00:00
Tatsuhiro Tsujikawa
048a2cf597
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Implemented BitTorrent/http/ftp integrated download.
I've rewritten lots of files and now some headers have forward
class declarations to reduce compile time.
The implementation is extremely alpha stage, I recommend to use this
for testing purpose only.
2007-10-11 16:58:24 +00:00