cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: question regarding CURLOPT_WRITEFUNCTION & CURLOPT_WRITEDATA

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 20 Oct 2008 16:46:40 +0200 (CEST)

On Mon, 20 Oct 2008, Jan wrote:

>> The function 'WriteMemoryCallback' in that example is exactly such a
>> callback. It gets called by libcurl when data is downloaded. And yes it
>> stores all downloaded data in a single memory chunk.
>> <http://daniel.haxx.se>
>
> so whatfor is the WRITEDATA call needed in this example?

Look at the WriteMemoryCallback and what it gets passed in as arguments.

Then look at what the example sets the WRITEDATA option to.

I don't know how to describe this is any other way than I've already done,
that the example shows and that the manual says.

> after finishing the last WRITEFUNCTION call all the chunks should be stored
> in the single memory struct "chunk"?

Yes!

-- 
  / daniel.haxx.se
Received on 2008-10-20