cURL / Mailing Lists / curl-library / Single Mail

curl-library

Question about control flow of curl

From: Sahan Gamage <sahans_at_gmail.com>
Date: Tue, 21 Mar 2006 12:54:54 +0600

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.
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).

So the basic requrement is this:

Engine -> curl_client_send_request();
Engine -> do some other work()
Engine -> get response headers();
Engine -> get some data of the response body()
Engine -> do some other work()
Engine -> get some data of the response body()
Engine -> do some other work()
....

Will libcurl be able to achive the above scenario ?

- Sahan
Received on 2006-03-21