cURL / Mailing Lists / curl-library / Single Mail

curl-library

Asynchronous transfers - details requested

From: Vincent Girard-Reydet <vincent.girard-reydet_at_f4-group.com>
Date: Fri, 06 Oct 2006 10:13:17 +0200

Hello,

I'm a new user to the curl library. I read the archives and saw that the
only way to have an asynchronous HTTP transfer with curl is to use the
multi interface.

I'm writing a wrapper that I'de like to be able to use as shown in the
following pseudo-code:

int reqId = wrapper.PerformRequest (an http request);

while (!wrapper.haveResults(reqId))
   process messages

Answer a = wrapper.GetAnswer(reqId);

....

It's very important that I am able to process messages because it
implies a screen refresh, and my requests might be long. I'm not able to
process messages in the write_data function.

If I use the multi interface with only one easy handle, will I be able
to have a this kind of behavior ? Will the curl_multi_perform() function
"cut" the transfer in small pieces ? A previous message told the
function is not blocking, but I don't see well how it behaves. Would
someone have a rough pseudo-code to provide ?

Thank you.

Vincent Girard-Reydet
Received on 2006-10-06