1CURLINFO_SPEED_UPLOAD_T(3) curl_easy_getinfo optionsCURLINFO_SPEED_UPLOAD_T(3)
2
3
4

NAME

6       CURLINFO_SPEED_UPLOAD_T - get upload speed
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_getinfo(CURL   *handle,   CURLINFO_SPEED_UPLOAD_T,
12       curl_off_t *speed);
13

DESCRIPTION

15       Pass a pointer to a curl_off_t to receive the average upload speed that
16       curl measured for the complete upload. Measured in bytes/second.
17

PROTOCOLS

EXAMPLE

20       CURL *curl = curl_easy_init();
21       if(curl) {
22         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
23
24         /* Perform the request */
25         res = curl_easy_perform(curl);
26
27         if(!res) {
28           curl_off_t speed;
29           res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
30           if(!res) {
31             printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n", speed);
32           }
33         }
34       }
35

AVAILABILITY

37       Added in 7.55.0
38

RETURN VALUE

40       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
41       if not.
42

SEE ALSO

44       curl_easy_getinfo(3),     curl_easy_setopt(3),     CURLINFO_SPEED_DOWN‐
45       LOAD_T(3),
46
47
48
49libcurl 7.71.1                  March 23, 2020      CURLINFO_SPEED_UPLOAD_T(3)
Impressum