summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.cc
Commit message (Collapse)AuthorAgeFilesLines
* Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint objectTatsuhiro Tsujikawa2016-01-091-7/+6
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-159/+144
|
* Evict timed out pooled socket periodicallyTatsuhiro Tsujikawa2015-11-111-7/+10
| | | | | | | | | | 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-3/+2
|
* Replace timer facility with chrono libTatsuhiro Tsujikawa2015-06-091-24/+30
|
* Use std::make_shared and make_unique where possible, part 1Tatsuhiro Tsujikawa2014-09-131-1/+1
|
* Delay auth failures instead of PBKDF2Nils Maier2014-07-221-73/+5
| | | | Closes GH-256
* Revert to existing "proper" coding styleTatsuhiro Tsujikawa2014-06-031-6/+6
| | | | | The rule is simple: don't try to change the coding style of the existing codebase.
* Initialize DownloadEngine::tokenAverageDuration_ to something.Nils Maier2014-05-271-1/+2
|
* Adjust RPC token processing timeNils Maier2014-05-201-3/+3
| | | | Make it consume a bit less time.
* Validate token using PBKDF2-HMAC-SHA1.Nils Maier2014-04-191-1/+91
| | | | | | | | This change should make token validation more resilient to: - timing attacks (constant time array compare) - brute-force/dictionary attacks (PBKDF2) Closes #220
* More code cleanupsNils Maier2013-08-211-40/+48
|
* Convert to autos and ranged loopsNils Maier2013-08-211-18/+12
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-3/+3
| | | | Courtesy of llvm cpp11-migrate 3.3
* Move GHR outside of function and provide ctor to suppress compiler warningTatsuhiro Tsujikawa2013-08-191-7/+12
| | | | Without ctor, compiler emits warning "unused variable ghr".
* Code cleanupTatsuhiro Tsujikawa2013-08-191-1/+1
|
* Win: Use SetConsoleCtrlHandler for SIGINT/SIGTERMNils Maier2013-08-181-0/+8
|
* 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-1/+1
|
* DownloadEngine: Use std::unique_ptr for dnsCache_Tatsuhiro Tsujikawa2013-07-061-1/+1
|
* DownloadEngine:: Use std::unique_ptr for webSocketSessionMan_Tatsuhiro Tsujikawa2013-07-061-2/+2
| | | | | | 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/+2
|
* DownloadEngine: Use std::unique_ptr for checkIntegrityMan_, fileAllocationMan_Tatsuhiro Tsujikawa2013-07-061-4/+4
|
* Return std::unique_ptr member as const refTatsuhiro Tsujikawa2013-06-261-4/+5
| | | | | 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-0/+5
|
* HttpRequest: Store non-owning raw pointer for authConfigFactory_Tatsuhiro Tsujikawa2013-06-251-2/+7
|
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-23/+19
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-32/+32
|
* Release elements in routineCommands_ on destructionTatsuhiro Tsujikawa2013-05-151-6/+9
|
* Refactor Notifier interface to accept DownloadEventListener interfaceTatsuhiro Tsujikawa2013-05-111-0/+11
| | | | | | | 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.
* Call onEndOfRun() on oneshot == true as wellTatsuhiro Tsujikawa2013-04-271-3/+1
|
* Add initialization function and addUri API function for libaria2Tatsuhiro Tsujikawa2013-04-261-5/+4
|
* Move initialization code in aria2::main to struct ContextTatsuhiro Tsujikawa2013-04-251-6/+12
|
* Revert DownloadEngine.cc change in 6b55f5d3 because Debian Lenny breaksTatsuhiro Tsujikawa2013-03-041-7/+1
|
* Do changes in 8aa1db6 in other places which include signal.hTatsuhiro Tsujikawa2013-03-031-1/+7
|
* Support UDP trackerTatsuhiro Tsujikawa2013-02-251-3/+3
| | | | | It shares UDP listening port with IPv4 DHT. At the moment, in order to enable UDP tracker support, enable IPv4 DHT.
* Initialized scalar membersTatsuhiro Tsujikawa2012-10-291-1/+2
|
* Reworked download/upload statistics calculationTatsuhiro Tsujikawa2012-10-251-1/+0
| | | | | | | | | | | | | | The old implementation calculates download/upload statistics for a RequestGroup by summing up all PeerStat objects. For global statistics, those are summed together. This clearly incurs runtime penalty and we introduced some kind of caching which updates statistics every 250ms but it did not work right. This change removes all these aggregation code, and instead makes RequestGroup and RequestGroupMan objects hold NetStat object and download/upload bytes are directly calculated by thier own NetStat. This is far more simplar than the old way and less runtime penalty and brings more accuracy.
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-6/+6
|
* Use std::string for SocketPoolEntry::options_Tatsuhiro Tsujikawa2012-09-261-12/+14
| | | | | Currently, we only store 1 value for FTP download. std::map is overkill in the this situation.
* Remove trailing white spacesTatsuhiro Tsujikawa2012-09-021-2/+2
|
* Catch exception from Socket::getPeerInfo() when pooling connectionTatsuhiro Tsujikawa2012-09-021-6/+24
| | | | | | | Socket::getPeerInfo() may fail if its TCP connection has already disconnected. In this case, we log this error. The success or failure of pooling connection should not affect the later execution of the program.
* Changed createSockPoolKey so that we can support IPv6 numeric address safely.Tatsuhiro Tsujikawa2011-11-121-3/+2
|
* Don't append character to std::string.Tatsuhiro Tsujikawa2011-11-121-7/+3
|
* Code cleanup. Avoid std::string temporaries.Tatsuhiro Tsujikawa2011-11-051-1/+1
|
* wallclock is now retrieved using global::wallclock() call.Tatsuhiro Tsujikawa2011-08-101-10/+7
| | | | | This is necessary to avoid global variable initialization order problem.
* Use A2_DELTA_MILLIS for timing critical code.Tatsuhiro Tsujikawa2011-03-271-8/+2
|
* Fixed the bug that microsecond part of timeval overwlows in waitData().Tatsuhiro Tsujikawa2011-03-201-2/+3
|
* Fixed rounding error in DownloadEngine::run().Tatsuhiro Tsujikawa2011-02-251-1/+8
| | | | | | This fixes the bug that executeCommand() with Command::STATUS_ALL is not called in every interval correctly because of rounding error in timer.