cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question about control flow of curl

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 20 Mar 2006 23:48:26 -0800

On Tue, Mar 21, 2006 at 12:54:54PM +0600, Sahan Gamage wrote:
> Hi all,
>
> We are writing a soap engine which is based on XML pull model. For the
> client side of the transport we found libcurl is a very good option.
> But the disadvantage of the libcurl as I found is, once we call
> curl_easy_perform() it waits until the entire response message arrives
> at the client side.

Sounds like you want to use the multi interface instead of the easy
interface. The former give a non-blocking (mostly) API to libcurl.

> My requirement is that, I want to send the request and then do some
> other processing. And when the soap engine ready to recieve data via
> http it should be able to get the response (it may block till data
> arrives) from the curl library. Also this reciving should not be
> "recieve at once". The engine should be able to pull the data from the
> incoming stream when they are requred (which is a must for large xml
> streams).

This is how both the easy and the multi interfaces already work. Your
write callback is called for every "chunk" of received data as it arrives.
curl does not buffer it.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-03-21