Discussion:
Application to request http2 content with multiple streams
Rajvardhan Deshmukh
2018-08-05 23:54:50 UTC
Permalink
Hi All,

I have 2 questions:

1. I intend to write an application to get content over HTTP2 over
multiple-streams over one connection. With the command line tool [1] i
could get content over single stream.

I found this snippet [2] that helped me write this [3]. But I need to
include the TLS version and ssl certificate details as specified with
the command line tool [1]

Can you tell me which additional symbols i should use to set the
certificate?

2. I also need to identify the api which requests chunks of data (so
that not all response data is written to the memory at the same time,
but as multiple of chunks). (Just like the 'iter_content(CHUNK_SIZE)' in
the requests [4] python library)

Thanks,
Raj

Links:
------
[1]
https://gist.github.com/deshmukhrajvardhan/f8690a3d1694fdbe8ada18416f05a1a4
[2] https://github.com/curl/curl/issues/1041
[3]
https://gist.github.com/deshmukhrajvardhan/3714c07c4216395c02a165d128c1bedd
[4]
https://github.com/requests/requests/blob/e4fc3539b43416f9e9ba6837d73b1b7392d4b242/requests/models.py#L724
Daniel Stenberg
2018-08-06 06:54:14 UTC
Permalink
On Sun, 5 Aug 2018, Rajvardhan Deshmukh wrote:

First: this is the mailing list for users of the curl tool. The curl-library
mailing list is much more suitable for libcurl users and hackers.
Post by Rajvardhan Deshmukh
1. I intend to write an application to get content over HTTP2 over
multiple-streams over one connection. With the command line tool [1] i could
get content over single stream.
The command line tool still only does transfers serially, but it will reuse
the same connection and thus do multiple streams if it can. Just not
multiplexed.
Post by Rajvardhan Deshmukh
I found this snippet [2] that helped me write this [3]. But I need to
include the TLS version and ssl certificate details as specified with
the command line tool [1]
Can you tell me which additional symbols i should use to set the
certificate?
Add "--libcurl template.c" to your command line arguments and you'll get a
good start!
Post by Rajvardhan Deshmukh
2. I also need to identify the api which requests chunks of data (so that
not all response data is written to the memory at the same time, but as
multiple of chunks). (Just like the 'iter_content(CHUNK_SIZE)' in the
requests [4] python library)
libcurl always delivers the response chunk by chunk with the write callback:
https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html
--
/ daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Eti
Loading...