I'm trying to write milt-threaded HTTP proxy for learning C++/socket/HTTP
I'm looking for a HTTP client library like HttpURLConnection available in Java.
I looked at some libraries eg, libcurl for C/C++. These libraries can make http request but they will return with the full content. I need a library that can read content partially in a buffer so that I'm able to ship it immediately to requesting client, without storing the entire content in memory.
Any links/suggestions is highly appreciated :)
thank you!
libcurl docs have an example page on how to get incremental download callbacks (into a memory buffer) as data streams in from a request:
http://curl.haxx.se/libcurl/c/getinmemory.html
In your case, you would just forward the data buffer on to the client that originally made the request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With