1CURLOPT_MAX_SEND_SPEED_LARGEc(u3r)l_easy_setopt optiCoUnRsLOPT_MAX_SEND_SPEED_LARGE(3)
2
3
4
6 CURLOPT_MAX_SEND_SPEED_LARGE - rate limit data upload speed
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAX_SEND_SPEED_LARGE,
12 curl_off_t maxspeed);
13
15 Pass a curl_off_t as parameter with the maxspeed. If an upload exceeds
16 this speed (counted in bytes per second) the transfer will pause to
17 keep the speed less than or equal to the parameter value. Defaults to
18 unlimited speed.
19
20 This is not an exact science. libcurl attempts to keep the average
21 speed below the given threshold over a period time.
22
23 If you set maxspeed to a value lower than CURLOPT_UPLOAD_BUFFERSIZE(3),
24 libcurl might "shoot over" the limit on its first send and still send
25 off a full buffer.
26
27 This option does not affect transfer speeds done with FILE:// URLs.
28
30 0, disabled
31
33 All except file://
34
36 CURL *curl = curl_easy_init();
37 if(curl) {
38 CURLcode ret;
39 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
40 /* cap the upload speed to 1000 bytes/sec */
41 curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)1000);
42 /* (set some upload options as well!) */
43 ret = curl_easy_perform(curl);
44 }
45
47 Added in 7.15.5
48
50 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
51 if not.
52
54 CURLOPT_MAX_RECV_SPEED_LARGE(3), CURLOPT_LOW_SPEED_LIMIT(3),
55
56
57
58libcurl 7.85.0 May 17, 2022 CURLOPT_MAX_SEND_SPEED_LARGE(3)