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
12 *speed);
13
15 Pass a pointer to a double to receive the average upload speed that
16 curl measured for the complete upload. Measured in bytes/second.
17
18 CURLINFO_SPEED_UPLOAD_T(3) is a newer replacement that returns a more
19 sensible variable type.
20
23 CURL *curl = curl_easy_init();
24 if(curl) {
25 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
26
27 /* Perform the request */
28 res = curl_easy_perform(curl);
29
30 if(!res) {
31 double speed;
32 res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
33 if(!res) {
34 printf("Upload speed %.0f bytes/sec\n", ul);
35 }
36 }
37 }
38
40 Added in
41
43 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
44 if not.
45
47 curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_SPEED_DOWNLOAD(3),
48
49
50
51libcurl 7.69.1 June 15, 2017 CURLINFO_SPEED_UPLOAD(3)