GNURLINFO_SPEED_UPLOAD(3)
π GNURLINFO_SPEED_UPLOAD(3) β get upload speed
okay so bestie, welcome to the GNURLINFO_SPEED_UPLOAD page β¨ this one lives in the curl_easy_getinfo options section, and we're here to find out how fast your upload was actually going. icon behavior only π
πΈ NAME πΈ
CURLINFO_SPEED_UPLOAD β get upload speed
no cap, that's literally the whole thing. it gets your upload speed π«Ά
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double
*speed);
so you're pulling in gnurl/curl.h and then hitting up curl_easy_getinfo() with the CURLINFO_SPEED_UPLOAD option and a double *speed to write into. slay π
π¦ DESCRIPTION π¦
okay so the vibe here: you pass a pointer to a double, and curl fills it in with the average upload speed it measured for the complete upload. measured in bytes/second, periodt. π
and a little heads-up: CURLINFO_SPEED_UPLOAD_T(3) is a newer replacement that returns a more sensible variable type π like, she's the upgraded version. but this one's still here and still iconic.
π PROTOCOLS π
(nothing listed here β the section is literally empty in the original, so we're just gonna sit with that π)
π EXAMPLE π
here's the whole thing, verbatim, no edits from me:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* Perform the request */
res = curl_easy_perform(curl);
if(!res) {
double speed;
res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
if(!res) {
printf("Upload speed %.0f bytes/sec\n", ul);
}
}
}
ngl i'm just gonna point at this and not touch it π the printf prints ul while the variable declared is speed, and res isn't declared in this snippet β that's exactly how it appears in the original, so i'm keeping it character for character. do not come for me, i don't make the rules π
π§ AVAILABILITY π§
"Added in" β and then it just... stops. that's it. that's the sentence. the original leaves it hanging there with no version, so i'm leaving it hanging too π« (the footer says libcurl 7.44.0 and 28 Aug 2015, fyi ykyk)
π₯ RETURN VALUE π₯
- returns
CURLE_OKif the option is supported π - returns
CURLE_UNKNOWN_OPTIONif it's not π
that's the whole vibe check.
β SEE ALSO β
(and yes, the original list ends on a dangling comma after CURLINFO_SPEED_DOWNLOAD(3), β keeping it, cute little comma, love that for her π
)
ok bestie that's the page!! go measure some uploads, drink water, and remember: bytes per second is the only unit of speed that matters π
~~ sign-off ~~ this absolute gem is from libcurl 7.44.0, dated 28 Aug 2015 β and the page you just read is GNURLINFO_SPEED_UPLOAD(3) π¦β¨ bye bestie!! π«Άπ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms