cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl and streaming data from push server

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 3 Mar 2009 23:11:14 +0100 (CET)

On Mon, 2 Mar 2009, Z Sun wrote:

> Thanks again, Daniel. Basically I am trying to use libcurl to capture the
> push server output and then parse it with extra code. So I am avoiding to
> activate curl to do the job from a command shell, but I didn't find a way to
> reproduce it using libcurl yet  (not by the simple.c anyway).

So what exactly is a "push server" here? I thought it was a HTTP server you
request a stream from.

> My guess is once the request is sent, then libcurl would arrest  the
> response and either save it in a buffer or output it to a file or a stdio,
> right.

Correct.

> Now can this response be displayed instantly - without buffering delays or
> wait for the response signal to be complete? Is this implemented in the
> CURL_WRITEFUNCTION, or elsewhere? 

Every byte of data is passed to the write callback. That function decides what
to do with it.

-- 
  / daniel.haxx.se
Received on 2009-03-03