curl / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLINFO_XFER_STATE

From: Lucas Pardue <Lucas.Pardue_at_bbc.co.uk>
Date: Wed, 24 May 2017 10:11:48 +0000

I've only skimmed the GitHub discussion but I would share your concerns Daniel.

Has an inversion of the solution been thought out? Rather than expose internals for a use case that "everyone" has to implement, why not design a libcurl API that embodies this? Thinking aloud, I can imagine some kind of "Request if X" API that lets us associate outgoing requests and schedule them if criteria X is satisfied (for X as "Host is reachable", "Request bytes written" etc)

Lucas

> -----Original Message-----
> From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Daniel Stenberg
> Sent: 24 May 2017 08:11
> To: libcurl hacking <curl-library_at_cool.haxx.se>
> Subject: CURLINFO_XFER_STATE
>
> Hi all,
>
> Over in pull request 1314 [1], neovasant has worked on polishing up an old
> idea into something that is now functional: exporting "transfer state" from a
> libcurl handle. It gives a little insight into what libcurl is doing with that
> transfer at the very moment of the request.
>
> Any opinions on this feature? Would it make your life easier?
>
> My two concerns about providing this information are:
>
> 1. I'm afraid that it lures users into drawing conclusions or making "funny
> things" because of the state they clearly can see the tranfer being in. Even if
> the state is highly transitional. Also, the states won't always be traversed in a
> numerical or other order an outside can forsee easily.
>
> 2. I'm concerned what happens when we add, remove or change internal
> states in future versions of libcurl and how that will change what we provide
> through this API and thus risk breaking some application that build
> dependencies on former behavior.
>
> Maybe I'm just overly careful.
>
> Any feedback on this topic is appreciated!
>
> [1] = https://github.com/curl/curl/pull/1314
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-24