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.


From: Daniel Stenberg via curl-library <>
Date: Mon, 20 Nov 2023 16:13:44 +0100 (CET)

On Mon, 20 Nov 2023, Cristian Rodríguez via curl-library wrote:

> My suggestion effectively stops proliferation of different TIMEOUT_WHATEVER
> options and provides exactly what application writers need, a parameter with
> the standardized type for intervals.

- I don't think there's so much proliferation. We basically allow seconds
   and/or milliseconds.

- timespec did not exist when we made the first options that accept timeouts
   and it not available in plain old C89

- It is still not a standardized type for timeouts in many APIs

- We use milliseconds in numerous options already, so that seems a much less
   surprising choice if we would add support for a higher resolution server
   response timeout. Consistency in the API makes it more predictable for

- providing a timespec struct pointer as an argument to curl_easy_setopt()
   seems a slightly more unfortable solution than a plain long holding
   milliseconds - for very little extra value. It seem unlikely to appear a
   demand for sub-millisecond resolutions for this functionality anytime soon,
   seeing as we have survived on integer seconds fine still today.

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features

Received on 2023-11-20