1CURLINFO_SPEED_DOWNLOAD_T(3)curl_easy_getinfo optionCsURLINFO_SPEED_DOWNLOAD_T(3)
2
3
4

NAME

6       CURLINFO_SPEED_DOWNLOAD_T - get download speed
7

SYNOPSIS

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

DESCRIPTION

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

PROTOCOLS

EXAMPLE

20       CURL *curl = curl_easy_init();
21       if(curl) {
22         curl_easy_setopt(curl, CURLOPT_URL, "https://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_DOWNLOAD_T, &speed);
30           if(!res) {
31             printf("Download 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_UPLOAD(3),
45       CURLINFO_SIZE_UPLOAD_T(3),
46
47
48
49libcurl 8.0.1                  January 02, 2023   CURLINFO_SPEED_DOWNLOAD_T(3)
Impressum