CURLOPT_LOW_SPEED_TIME(3)

πŸ’… CURLOPT_LOW_SPEED_TIME(3) πŸ’…

okay so bestie, this is a page from the Library Functions Manual and honestly? it's giving "the vibes are too slow, we're leaving" energy. buckle up πŸŽ€


✨ NAME ✨

CURLOPT_LOW_SPEED_TIME β€” the low speed limit time period, aka "how long do we tolerate this snail situation before we bail" 🐌⏱️


🌸 SYNOPSIS 🌸

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_TIME,
                          long speedtime);

πŸ¦‹ DESCRIPTION πŸ¦‹

so you pass a long as the parameter, right? and it holds the time in number seconds that the transfer speed should be below the CURLOPT_LOW_SPEED_LIMIT(3) β€” like, below it the whole time β€” for the library to consider it "too slow" and just abort. periodt. πŸ’€

literally it's the patience timer. the "you have this many seconds to stop being slow" timer. no cap. πŸ”₯


πŸŽ€ DEFAULT πŸŽ€

0, which means disabled β€” so by default there's no patience limit and the vibe check never fails πŸ™ˆ


🌈 PROTOCOLS 🌈

this functionality affects all supported protocols β€” every single one, no exceptions, we love an inclusive icon πŸ‘‘


⭐ EXAMPLE ⭐

int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
    /* abort if slower than 30 bytes/sec during 60 seconds */
    curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
    curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L);
    result = curl_easy_perform(curl);
    if(CURLE_OPERATION_TIMEDOUT == result) {
      printf("Timeout.\n");
    }
    /* always cleanup */
    curl_easy_cleanup(curl);
  }
}

see how the comment says it all β€” abort if slower than 30 bytes/sec during 60 seconds β€” that's the whole plot bestie πŸ“


πŸ’œ AVAILABILITY πŸ’œ

added in curl 7.1 β€” an oldie but a goodie, she's been here since forever and she ate 🫢


🌸 RETURN VALUE 🌸

curl_easy_setopt(3) returns a CURLcode indicating success or error β€” like a little mood ring for your function call πŸ’…

  • CURLE_OK (0) means everything was OK ✨
  • anything non-zero means an error occurred 😭 β€” go check libcurl-errors(3) for the tea

πŸ‘‘ SEE ALSO πŸ‘‘

the rest of the squad, fr fr 🧚


and that's the page!! brought to you by libcurl, dated 2026-10-12, from the one and only CURLOPT_LOW_SPEED_TIME(3) manual page β€” mwah πŸ’–βœ¨

πŸ“¦ where this page comes from