1CURLOPT_LOW_SPEED_TIME(3) curl_easy_setopt options CURLOPT_LOW_SPEED_TIME(3)
2
3
4
6 CURLOPT_LOW_SPEED_TIME - low speed limit time period
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_TIME, long
12 speedtime);
13
15 Pass a long as parameter. It contains the time in number seconds that
16 the transfer speed should be below the CURLOPT_LOW_SPEED_LIMIT(3) for
17 the library to consider it too slow and abort.
18
20 0, disabled
21
23 All
24
26 curl = curl_easy_init();
27 if(curl) {
28 curl_easy_setopt(curl, CURLOPT_URL, url);
29 /* abort if slower than 30 bytes/sec during 60 seconds */
30 curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
31 curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L);
32 res = curl_easy_perform(curl);
33 if(CURLE_OPERATION_TIMEDOUT == res) {
34 printf("Timeout!\n");
35 }
36 /* always cleanup */
37 curl_easy_cleanup(curl);
38 }
39
41 Always
42
44 Returns CURLE_OK
45
47 CURLOPT_LOW_SPEED_LIMIT(3), CURLOPT_TIMEOUT(3),
48
49
50
51libcurl 7.79.1 September 08, 2021 CURLOPT_LOW_SPEED_TIME(3)