1CURLOPT_MAX_RECV_SPEED_LARGEc(u3r)l_easy_setopt optiCoUnRsLOPT_MAX_RECV_SPEED_LARGE(3)
2
3
4

NAME

6       CURLOPT_MAX_RECV_SPEED_LARGE - rate limit data download speed
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAX_RECV_SPEED_LARGE,
12                                 curl_off_t maxspeed);
13

DESCRIPTION

15       Pass  a  curl_off_t  as parameter.  If a download exceeds this maxspeed
16       (counted in bytes per second) the transfer will pause to keep the speed
17       less than or equal to the parameter value. Defaults to unlimited speed.
18
19       This  is  not  an  exact  science. libcurl attempts to keep the average
20       speed below the given threshold over a period time.
21
22       If you set  maxspeed  to  a  value  lower  than  CURLOPT_BUFFERSIZE(3),
23       libcurl might download faster than the set limit initially.
24
25       This option does not affect transfer speeds done with FILE:// URLs.
26

DEFAULT

28       0, disabled
29

PROTOCOLS

31       All but file://
32

EXAMPLE

34       CURL *curl = curl_easy_init();
35       if(curl) {
36         CURLcode ret;
37         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
38         /* cap the download speed to 31415 bytes/sec */
39         curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)31415);
40         ret = curl_easy_perform(curl);
41       }
42

AVAILABILITY

44       Added in 7.15.5
45

RETURN VALUE

47       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
48       if not.
49

SEE ALSO

51       CURLOPT_MAX_SEND_SPEED_LARGE(3), CURLOPT_LOW_SPEED_LIMIT(3),
52
53
54
55libcurl 8.0.1                  January 02, 2023CURLOPT_MAX_RECV_SPEED_LARGE(3)
Impressum