C++ library for dealing with multiple HTTP connections

Posted by JWood on Stack Overflow See other posts from Stack Overflow or by JWood
Published on 2011-03-12T16:04:24Z Indexed on 2011/03/12 16:10 UTC
Read the original article Hit count: 307

Filed under:
|
|
|

Hi,

I'm looking for a library to deal with multiple simultaneous HTTP connections (pref. on a single thread) to use in C++ in Windows so it can be Win32 API based.

So far, I have tried cURL (multi interface) which seems to be the most appropriate that I have found but my problem is that I may have a queue of 200 requests but I need to only run 4 of them at a time. This becomes problematic when one request may take 2 seconds and another may take 2 mins as you have to wait on all handles and receive the result of all requests in one block. If anyone knows a way round this it would be very useful.

I have also tried rolling my own using WinHTTP but I need to throttle the requests so they would ideally need to be on a single thread and use callbacks for data which WinHTTP does not do.

The best thing I've found which would solve all my problems is ASIHTTPRequest but unfortunately it's Mac OSX only.

Thanks, J

© Stack Overflow or respective owner

Related posts about c++

Related posts about winapi