curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: CURLOPT_LOW_SPEED_TIME and CURLOPT_LOW_SPEED_LIMIT

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 10 Jun 2020 10:01:16 +0200 (CEST)

On Wed, 10 Jun 2020, James Read via curl-library wrote:

> /* 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);
>
> What does abort if slower than 30 bytes/sec during 60 seconds mean?

If the transfer speed as measure by libcurl stays below 30 bytes per second
for a duration of 60 seconds, the transfer is aborted.

> Is this an average speed over any given 60 second period?

The transfer speed this logic uses as input is the "momentary" transfer speed
- which is based on a moving average over the last 5 seconds.

> I want it to abort after a given time period. Are these the options for me?

If you want it to be a fixed time where it should stop, then CURLOPT_TIMEOUT
is more suitable.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-06-10