summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.h
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-74/+43
|
* Evict timed out pooled socket periodicallyTatsuhiro Tsujikawa2015-11-111-0/+2
| | | | | | | | | | Previously we only scanned pool socket to check they are timed out when we pooled another socket. This means that pooled socket is not closed long time (stays in CLOSE-WAIT state) if we don't pool any more socket. In this commit, we now check pooled socket periodically (30 seconds) to avoid the sockets hanging in CLOSE-WAIT state long time. See GH-477
* Use user-defined literals for time unitsTatsuhiro Tsujikawa2015-06-211-4/+4
|
* Replace timer facility with chrono libTatsuhiro Tsujikawa2015-06-091-12/+9
|
* Delay auth failures instead of PBKDF2Nils Maier2014-07-221-3/+0
| | | | Closes GH-256
* Validate token using PBKDF2-HMAC-SHA1.Nils Maier2014-04-191-0/+16
| | | | | | | | This change should make token validation more resilient to: - timing attacks (constant time array compare) - brute-force/dictionary attacks (PBKDF2) Closes #220
* Ensure that Commands are cleaned up before RequestGroupMan is deletedTatsuhiro Tsujikawa2013-09-251-3/+4
|
* DownloadEngine: Use std::unique_ptr for eventPoll_Tatsuhiro Tsujikawa2013-07-061-2/+2
|
* Refactor MultiUrlRequestInfo ctorTatsuhiro Tsujikawa2013-07-061-2/+2
| | | | | | | StatCalc creation is moved to MultiUrlRequestInfo. The summary output is done only when PREF_QUIET is false and it is always to global::cout(), so remove summaryOut_ and just use global::cout() in that case. Also use std::unique_ptr for statCalc_ in DownloadEngine.
* DownloadEngine: Use std::unique_ptr for btRegistry_Tatsuhiro Tsujikawa2013-07-061-2/+2
|
* DownloadEngine: Use std::unique_ptr for dnsCache_Tatsuhiro Tsujikawa2013-07-061-1/+1
|
* DownloadEngine:: Use std::unique_ptr for webSocketSessionMan_Tatsuhiro Tsujikawa2013-07-061-4/+4
| | | | | | Notifier::addDownloadEventListener now takes pointer to DownloadEventListener. Session holds unique_ptr to ApiCallbackDownloadEventListener object.
* DownloadEngine: Use std::unique_ptr for RequestGroupManTatsuhiro Tsujikawa2013-07-061-3/+3
|
* DownloadEngine: Use std::unique_ptr for checkIntegrityMan_, fileAllocationMan_Tatsuhiro Tsujikawa2013-07-061-6/+6
|
* Return std::unique_ptr member as const refTatsuhiro Tsujikawa2013-06-261-2/+2
| | | | | Returning raw pointer has a risk that it may be stolen by std::shared_ptr in accident.
* HttpRequest: Use raw non-owning pointer for cookieStorage_Tatsuhiro Tsujikawa2013-06-251-5/+2
|
* HttpRequest: Store non-owning raw pointer for authConfigFactory_Tatsuhiro Tsujikawa2013-06-251-6/+3
|
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-5/+5
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-47/+47
|
* Release elements in routineCommands_ on destructionTatsuhiro Tsujikawa2013-05-151-2/+0
|
* Refactor Notifier interface to accept DownloadEventListener interfaceTatsuhiro Tsujikawa2013-05-111-0/+18
| | | | | | | WebSocketSessionMan now implements DownloadEventListener and is added to Notifier. It becomes member variable of DownloadEngine. The event constant for download event is defined in aria2.h so that we can add event callback API later.
* Add initialization function and addUri API function for libaria2Tatsuhiro Tsujikawa2013-04-261-0/+1
|
* Move initialization code in aria2::main to struct ContextTatsuhiro Tsujikawa2013-04-251-1/+5
|
* Support UDP trackerTatsuhiro Tsujikawa2013-02-251-1/+6
| | | | | It shares UDP listening port with IPv4 DHT. At the moment, in order to enable UDP tracker support, enable IPv4 DHT.
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-3/+3
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-2/+0
|
* Use std::string for SocketPoolEntry::options_Tatsuhiro Tsujikawa2012-09-261-9/+9
| | | | | Currently, we only store 1 value for FTP download. std::map is overkill in the this situation.
* Set DEFAULT_REFRESH_INTERVAL 1000 to update console readout moreTatsuhiro Tsujikawa2011-02-261-1/+1
| | | | smoothly.
* Check the availability of ares_set_servers and ares_addr_node.Tatsuhiro Tsujikawa2011-02-181-2/+4
|
* Added --async-dns-server option.Tatsuhiro Tsujikawa2011-02-081-0/+11
| | | | | | | | | | This option accepts comma separated list of DNS server address used in asynchronous DNS resolver. Usually asynchronous DNS resolver reads DNS server addresses from /etc/resolv.conf. When this option is used, it uses DNS servers specified in this option instead of ones in /etc/resolv.conf. You can specify both IPv4 and IPv6 address. This option is useful when the system does not have /etc/resolv.conf and user does not have the permission to create it.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-3/+0
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-23/+8
| | | | | | | | | 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-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-311-3/+3
| | | | | | Made #include guard consistent for c++ header files.
* 2010-10-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-191-2/+2
| | | | | | | | | | | Don't reuse socket which is readable because we assume that if socket is readable it means peer shutdowns connection and the socket will receive EOF. Added default timeout value to DownloadEngine::poolSocket(). * src/DownloadEngine.cc * src/DownloadEngine.h
* 2010-07-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-281-3/+4
| | | | | | | | | | | | | Set milliseconds in DownloadEngine::refreshInterval_. Because there is difference in accuracy between epoll and clock_gettime(), we set DEFAULT_REFRESH_INTERVAL 900ms just lower than default timeout 1 sec for epoll. Also set update interval of ConsoleStatCalc to 900ms by the same reason. * src/ConsoleStatCalc.cc * src/DownloadEngine.cc * src/DownloadEngine.h
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-42/+42
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-121-1/+1
| | | | | | | | Renamed member variables. * src/DownloadEngine.cc * src/DownloadEngine.h
* 2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-081-6/+54
| | | | | | | Made public member variables of DownloadEngine private. Added accessor funcs.
* 2010-05-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-05-211-20/+24
| | | | | | | | | | | | | | | | | Fixed the bug that connection pooling does not take into account proxy. This means that when connection A via proxy X is pooled, it will be wrongly reused in the download using proxy Y. * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/HttpDownloadCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc
* 2010-05-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-05-211-11/+18
| | | | | | | | | | | | | | | | Fixed the bug that FTP download may fail when control connection is reused. This happens because FTP server can offer different root directory for different account. If pooled connections has different root directory, then download will fail. * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpConnection.cc * src/FtpConnection.h * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc
* 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-111-3/+3
| | | | | | | | Use clock_gettime(CLOCK_MONOTONIC, ...) if it is available and usable to prevent from aria2 from being affected by system time change.
* 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-021-0/+2
| | | | | | | | | | | Added forceHalt argument to TimedHaltCommand. Added requestForceHalt() to DownloadEngine. * src/DownloadEngine.cc * src/DownloadEngine.h * src/TimedHaltCommand.cc * src/TimedHaltCommand.h
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-3/+4
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-01-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-171-0/+7
| | | | | | | | | | | | | | | | Added aria2.getSessionInfo XML-RPC method. This method returns a struct containing Session ID, which is generated each time when aria2 is invoked. * doc/aria2c.1.txt * doc/xmlrpc/aria2rpc * src/DownloadEngine.cc * src/DownloadEngine.h * src/XmlRpcMethodFactory.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h * test/XmlRpcMethodTest.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-061-1/+8
| | | | | | | | | | Find pooled socket using all cached addresses. * src/DNSCache.h * src/DownloadEngine.cc * src/DownloadEngine.h * src/InitiateConnectionCommand.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-24/+24
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-10-311-2/+0
| | | | | | | | | | | | | | | | | Throw exception if binding listening port is failed. Removed RequestGroupMan::getInitialCommand(). Use fillRequestGroupFromReserver() instead. Delete commands for RequestGroup which has errors when it is being added. * src/BtSetup.cc * src/DownloadEngine.cc * src/DownloadEngine.h * src/DownloadEngineFactory.cc * src/MultiUrlRequestInfo.cc * src/RequestGroupMan.cc * src/RequestGroupMan.h * test/RequestGroupManTest.cc
* 2009-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixed the bug that the option values changed by XML-RPC method(changeOption and changeGlobalOption) are overwritten to the previous value by the next these request which doesn't contain that option value. Supporse max-download-limit is initially 0. You changed this value to 100K by changeOption. Then you issue changeOption request to change max-upload-limit to 50K. This second request doesn't contain xml-download-limit, so it is back to initial value, 0. Another improvement is that exception is thrown when changeOption and changeGlobalOption request contains option name which doesn't allowed in each request. * src/DownloadEngine.h * src/XmlRpcMethod.cc * src/XmlRpcMethod.h * src/XmlRpcMethodImpl.cc * src/download_helper.cc * src/download_helper.h * test/XmlRpcMethodTest.cc
* 2009-07-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-251-1/+7
| | | | | | | | | Fixed compile error without BitTorrent support * src/DefaultBtProgressInfoFile.cc * src/DownloadEngine.cc * src/DownloadEngine.h
* 2009-07-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-07-021-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Try all available addresses returned by DNS until it gets connected in HTTP(S)/FTP download * src/AbstractCommand.cc * src/AbstractCommand.h * src/AbstractProxyRequestCommand.cc * src/AbstractProxyRequestCommand.h * src/DNSCache.h * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpInitiateConnectionCommand.cc * src/FtpInitiateConnectionCommand.h * src/FtpNegotiationCommand.cc * src/FtpNegotiationCommand.h * src/HttpInitiateConnectionCommand.cc * src/HttpInitiateConnectionCommand.h * src/HttpRequestCommand.cc * src/HttpRequestCommand.h * src/InitiateConnectionCommand.cc * src/InitiateConnectionCommand.h * test/DNSCacheTest.cc * test/Makefile.am * test/SimpleDNSCacheTest.cc