cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: question regarding CURLOPT_WRITEFUNCTION & CURLOPT_WRITEDATA

From: Jan <haihappn_at_gmail.com>
Date: Mon, 20 Oct 2008 14:53:35 +0200

2008/10/20 Daniel Stenberg <daniel_at_haxx.se>

> On Mon, 20 Oct 2008, Jan wrote:
>
> You make sure your callback makes it so. Like the getinmemory.c example!

thanks for mentioning this - this helps a lot.
little question regarding this example: is the call of
curl_easy_setopt<http://curl.haxx.se/lxr/ident?i=curl_easy_setopt>(curl_handle,
CURLOPT_WRITEDATA <http://curl.haxx.se/lxr/ident?i=CURLOPT_WRITEDATA>, (void
*)&chunk) needed? because WRITEFUNCTION already creates the large chunk. at
least thats how i understand it til now. the background of my question is
that on the one hand i want to have a look at the content of the chunk (here
comes getinmemory.c into play) and on the other hand i want to write the
data to a file where i used WRITEDATA for.
so can i use WRITEFUNCTION to create my large chunk and WRITEDATA to write
the data to a file?

 --
Jan
Received on 2008-10-20