1CURLOPT_LOW_SPEED_TIME(3)  curl_easy_setopt options  CURLOPT_LOW_SPEED_TIME(3)
2
3
4

NAME

6       CURLOPT_LOW_SPEED_TIME - set low speed limit time period
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL  *handle,  CURLOPT_LOW_SPEED_TIME, long
12       speedtime);
13

DESCRIPTION

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

DEFAULT

20       0, disabled
21

PROTOCOLS

23       All
24

EXAMPLE

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

AVAILABILITY

41       Always
42

RETURN VALUE

44       Returns CURLE_OK
45

SEE ALSO

47       CURLOPT_LOW_SPEED_LIMIT(3), CURLOPT_TIMEOUT(3),
48
49
50
51libcurl 7.76.1                 November 04, 2020     CURLOPT_LOW_SPEED_TIME(3)
Impressum