curl: implement CURLOPT_TIMEOUT and CURLOPT_TIMEOUT_MS
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 4 Aug 2015 21:57:19 +0000 (17:57 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 4 Aug 2015 21:57:19 +0000 (17:57 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/curl/native_curl.nit

index cc6f298..4608dbe 100644 (file)
@@ -696,8 +696,12 @@ extern class CURLOption `{ CURLoption `}
 
        # Connection Options
 
-#      new     `{ return CURLOPT_TIMEOUT; `}
-#      new     `{ return CURLOPT_TIMEOUT_MS; `}
+       # Set maximum time the request is allowed to take.
+       new     timeout `{ return CURLOPT_TIMEOUT; `}
+
+       # Set maximum time the request is allowed to take (in ms).
+       new     timeout_ms `{ return CURLOPT_TIMEOUT_MS; `}
+
 #      new     `{ return CURLOPT_LOW_SPEED_LIMIT; `}
 #      new     `{ return CURLOPT_LOW_SPEED_TIME; `}
 #      new     `{ return CURLOPT_MAX_SEND_SPEED_LARGE; `}