curl-library
Re: Libcurl: Using libcurl, is it possible to create a list of GET requests for the same easy handle?
Date: Thu, 18 Sep 2014 08:39:36 +0200 (CEST)
On Thu, 18 Sep 2014, nikhil ap wrote:
> Create a easy handle, set up the connection and send 1 GET request.
> -
>
> Once the response is received, use the same handle and send 2 GET
> requests.
This doesn't make sense. Why do you insist on using that exact same easy
handle to do two more requests with? I mean, that's perfectly fine but then
you need to do those two request in serial and not in parallel. An easy handle
can only handle one transfer at a time, but a multi handle can handle any
amount of parallel easy handles/transfers.
> I would also like to:
>
> - Send multiple GET requests in an incremental order based on timeout.
> I.e If I have sent 3 GET requests, after a second I would like to send 4
> requests irrespective of whether I have received the response using the
> same connection handle.
That's no problem with the multi interface, you just add the new handles
whenever you think they should start.
> I know about Pipeling feature so I use that for other use case but I can't
> use that to do the above. Is there a way to do this using Libcurl?
Yes, it is even easy to do with libcurl!
I don't see how pipelining changes anything for what you're asking. Can you
elaborate?
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-09-18