cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: never-ending incoming stream: how to see it?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 15 Feb 2010 10:31:13 +0100 (CET)

On Mon, 15 Feb 2010, Pete Wilson wrote:

> I must act on incoming data as it arrives, but the data are part of a
> continuous, unending stream of HTTP messages.
>
> What is the best way to tell libcurl, during the synchronous read of this
> stream, to give control once in a while to my main program code?
>
> Or else please tell me if the read of the stream needs to be asynchronous.

It's really up to you. libcurl provides several different ways for you to get
a HTTP stream, and reading up on curl_easy_perform() and curl_multi_perform()
should give you an idea of how they work and what their differences are.

It basically depends on if you want a synch or async call and libcurl offers
boths ways.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-15