summaryrefslogtreecommitdiff
path: root/src/Request.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-17 21:19:45 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-17 21:19:45 +0900
commitf2a63fa06a931333ac2e4a3a5d36a56418b4b6cd (patch)
tree1a9114f36cdb32cfd5e0272b672f0c8d5b420cde /src/Request.h
parent4824b09237e049ac7d912cdaa4a8a041eedd5dab (diff)
Added --retry-wait option.
This option was once existed in aria2 but erased on 2009-09-20. Now it is resurrected once again. We choose 2 as default value, but there is no good theory behind it. Now we retry HTTP download when remote server returns 503 Service Unavailable if --retry-wait > 0. We also added error code 29: HTTP_SERVICE_UNAVAILABLE.
Diffstat (limited to 'src/Request.h')
-rw-r--r--src/Request.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Request.h b/src/Request.h
index e1889ad2..c4653968 100644
--- a/src/Request.h
+++ b/src/Request.h
@@ -39,6 +39,7 @@
#include <string>
#include "SharedHandle.h"
+#include "TimerA2.h"
namespace aria2 {
@@ -96,6 +97,8 @@ private:
uint16_t connectedPort_;
+ Timer wakeTime_;
+
bool parseUri(const std::string& uri);
public:
Request();
@@ -229,6 +232,16 @@ public:
return connectedPort_;
}
+ void setWakeTime(Timer timer)
+ {
+ wakeTime_ = timer;
+ }
+
+ const Timer& getWakeTime()
+ {
+ return wakeTime_;
+ }
+
static const std::string METHOD_GET;
static const std::string METHOD_HEAD;