CURLINFO_SPEED_DOWNLOAD(3)
π CURLINFO_SPEED_DOWNLOAD(3) π
okay so bestie, you're in the libcurl part of the manual (Library Functions Manual), and today's main character is CURLINFO_SPEED_DOWNLOAD β the download speed girlie. let's get into it π
β¨ NAME β¨
CURLINFO_SPEED_DOWNLOAD β download speed. literally just download speed, that's the whole vibe π¦
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD,
double *speed);
β¨ DESCRIPTION β¨
so here's the tea β β you pass a pointer to a double, and curl fills it with the average download speed it measured for the complete download. measured in bytes/second, no cap π₯π₯
lowkey important though: CURLINFO_SPEED_DOWNLOAD_T(3) is the newer replacement, and it returns a more sensible variable type. so likeβ¦ this one still works, but the _T version is the upgraded, more sensible icon π β iykyk.
π PROTOCOLS π
this functionality affects all supported protocols. every single one. she's versatile π β¨
β¨ EXAMPLE β¨
here's how you'd actually use it, copy-paste style π«Ά
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* Perform the request */
result = curl_easy_perform(curl);
if(!result) {
double speed;
result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed);
if(!result) {
printf("Download speed %.0f bytes/sec\n", speed);
}
}
}
}
π DEPRECATED π
deprecated since 7.55.0. she's an icon, she's a legend, but she is deprecated β go use the _T one for new stuff, bestie π
β AVAILABILITY β
added in curl 7.4.1 β vintage, but make it fashion π
π RETURN VALUE π
curl_easy_getinfo(3) returns a CURLcode indicating success or error.
CURLE_OK (which is 0) means everything was OK π β non-zero means an error occurred, so go check libcurl-errors(3) to find out what went wrong π
π¦ SEE ALSO π¦
πΈ that's the whole page, no notes. brought to you by libcurl, dated 2026-10-12 β mwah, go measure some bytes per second ππ§ββοΈ
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms