Hi All, Some more thoughts and questions on same: For #1 case, may be its not logical to specify dependency on the handle currently being setup.
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 ? 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. As we need the option to be set of HTTP/1.1 also. if(Curl_conncache_bundle_size(conn_temp) < max_host_connections && Curl_conncache_size(data) < max_total_connections) { /* We want a new connection anyway */ reuse = FALSE; infof(data, "We can reuse, but we want a new connection anyway\n"); Curl_conncache_return_conn(conn_temp); } Thanks, Kunal On Mon, Mar 18, 2019 at 1:01 PM Kunal Ekawde <kunaleka...@gmail.com> wrote: > Hello Everyone, > > I'm trying HTTP/2 stream dependency transfers using libcurl 7.64.0 + > nghttp2 1.36 with server-libmicrohttpd + nghttp2 - just echo no delay. > > I've used the example http2-download.c in libcurl > Just added: > curl_easy_setopt(easy[1], CURLOPT_STREAM_DEPENDS_E, easy[2]); > curl_easy_setopt(easy[2], CURLOPT_STREAM_DEPENDS_E, easy[0]); > before: > curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); > /* we start some action by calling perform right away */ > curl_multi_perform(multi_handle, &still_running); > > I've also attempted these setting in setup function i.e before > curl_multi_add_handle > > There 2 concerns here: > 1. I'm not able to specify dependency on the stream/handle which is > currently being setup. So basically, for 2 streams, I cannot set stream 1 > depends on stream 3, in pcap it show stream 1 depends on stream 0. Incase > of above example, it shows, 3 exclusive depends on 0 and 5 exclusive > depends on 1. Expectation is 3 exclusive depends on 5 and 5 exclusive > depends on 1, like: > 1 > 5 > 3 > > 2. For Above example, out of 10 transfers, > 2 transfers showed order(in pcap): > HTTP2 768 HEADERS[5]: 200 OK, HEADERS[1]: 200 OK, HEADERS[3]: 200 > OK, DATA[5], DATA[1], DATA[3] > > 6 transfers showed order: > HTTP2 765 HEADERS[1]: 200 OK, HEADERS[3]: 200 OK, HEADERS[5]: 200 > OK, DATA[1], DATA[3], DATA[5] > > 2 showed: > 1, 5, 3 > > > Is this expected or is the way of setting the dependency incorrect? > > Thanks, > ~Kunal > -- ~Kunal
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html