CURLINFO_SPEED_UPLOAD_T(3)
okay so bestie, welcome to the CURLINFO_SPEED_UPLOAD_T(3) page from the Library Functions Manual β it's literally all about getting that upload speed tea ββ¨
π NAME π
CURLINFO_SPEED_UPLOAD_T β upload speed, bestie π
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD_T,
curl_off_t *speed);
π¦ DESCRIPTION π¦
So here's the vibe: you pass a pointer to a curl_off_t, and it receives the average upload speed that curl measured for the complete upload. The unit is bytes/second. No cap, that's the whole thing π«Ά
reminder: it's the average for the complete upload, not some live speedometer situation.
π PROTOCOLS π
This functionality affects all supported protocols β it's not picky, it's giving universal icon energy π
π EXAMPLE π
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) {
curl_off_t speed;
result = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
if(!result) {
printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n", speed);
}
}
}
}
β AVAILABILITY β
Added in curl 7.55.0 β vintage-ish but still slaying π
π₯ RETURN VALUE π₯
curl_easy_getinfo(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK. Non-zero means an error occurred β see libcurl-errors(3) for the full drama π
π SEE ALSO π
k bye bestie! π«Ά this page is from libcurl, stamped 2026-10-12, and yes it's the CURLINFO_SPEED_UPLOAD_T(3) manual page β mwah πβ¨
π¦ 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