curl-library
Re: http2 stream dependency observation
Date: Tue, 19 Mar 2019 20:12:09 +0100 (CET)
On Tue, 19 Mar 2019, Kunal Ekawde via curl-library wrote:
> For #1 case, may be its not logical to specify dependency on the handle
> currently being setup.
Easy handles is really the only identifier to a transfer that we have in the
API so using something *else* would be strange I think.
I suspect very few users ever actually used HTTP/2 stream dependencies much
with curl so your experiences are indeed valuable but if you run into issues,
it might simply be because nobody else ran into those or at least nobody else
reported them.
> Another concern is that of multiplexing streams. So when we support
> HTTP/1.1 and HTTP/2 using same libcurl stack and same multi handle, how can
> we specify CURLMOPT_MAX_TOTAL_CONNECTIONS & CURLMOPT_MAX_HOST_CONNECTIONS ?
I don't think that's curl's job to tell. Those settings are there for the
application to restrict libcurl and they do, independently of what HTTP
version that is used.
> If we specify CURLMOPT_MAX_HOST_CONNECTIONS > 1 and try to initiate multiple
> HTTP/2 transfers, libcurl tries to open new connection instead of reusing.
Yes and no.
libcurl will focus on getting things done *now* rather than later so if you
ask for >1 request at once, it will open separate connections for them. Unless
you set CURLOPT_PIPEWAIT that tells curl it is fine to wait and see if it can
rather multiplex instead of creating a new connection.
> As we need the option to be set of HTTP/1.1 also.
If you *need* to limit the number of connections then why does the HTTP
version matter?
-- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2019-03-19