C ++ library for working with multiple HTTP connections

I am looking for a library to work with multiple simultaneous HTTP connections (pref. On a single thread) for use in C ++ on Windows, so it could be based on the Win32 API. This is for a client application that needs to process the list of requests, but 4 runs all the time until the list is complete.

So far I have tried cURL (multi interface), which seems to be the most suitable that I found, but my problem is that I can have a queue of 200 requests, but I only need to run 4 of them at a time, This becomes problematic when one request may take 2 seconds and another may take 2 minutes, since you have to wait on all the handles and get the result of all requests in one block. If someone knows a way around this, this will be very helpful.

I also tried reprogramming my own using WinHTTP, but I need to strangle the requests so that they ideally should be on the same thread and use callbacks for data that WinHTTP does not.

The best thing I found that would solve all my problems is ASIHTTPRequest, but unfortunately it is only Mac OSX.

Thanks J

+3
source share
4 answers

Have you looked at boost.asio? http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio.html

It is designed to scale and has examples with http servers: http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/examples.html

+4
source

Have you tried Boost Asio? It has multiplicative and stellar performance and with good HTTP examples.

http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio.html

+3
source

Asio - , , HTTP - : , , ..
, Boost Asio, HTTP: cpp-netlib , AFAIK , .
, libcurl, "" .

0

libcurl multi , .

0

All Articles