1CURLINFO_SPEED_UPLOAD(3) curl_easy_getinfo options CURLINFO_SPEED_UPLOAD(3)
2
3
4
6 CURLINFO_SPEED_UPLOAD - get upload speed
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double *speed);
12
14 Pass a pointer to a double to receive the average upload speed that
15 curl measured for the complete upload. Measured in bytes/second.
16
17 CURLINFO_SPEED_UPLOAD_T(3) is a newer replacement that returns a more
18 sensible variable type.
19
22 CURL *curl = curl_easy_init();
23 if(curl) {
24 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
25
26 /* Perform the request */
27 res = curl_easy_perform(curl);
28
29 if(!res) {
30 double speed;
31 res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
32 if(!res) {
33 printf("Upload speed %.0f bytes/sec\n", speed);
34 }
35 }
36 }
37
39 Added in 7.4.1. Deprecated since 7.55.0.
40
42 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
43 if not.
44
46 curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_SPEED_DOWNLOAD(3),
47
48
49
50libcurl 8.0.1 January 02, 2023 CURLINFO_SPEED_UPLOAD(3)