cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: memory callback function

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 May 2002 00:00:35 +0200 (MET DST)

On 27 May 2002, yarram sunil wrote:

> Memory callback function is called when the whole page is not downloaded.

Uh? No, we don't call any "memory callback" when a page is not downloaded.

> I want the callback to be called after downloading the whole page. Is it
> possible?

The write callback gets called by libcurl as soon as libcurl has received a
chunk of data from the remote peer. If you get a small piece of transfer, you
might very well get the whole piece in one call but you're most likely to
always get the document in N number of calls.

If you want the whole document in memory in one piece, then you just add all
pieces together.

BTW, CURL_MAX_WRITE_SIZE is the maximum number of bytes you can get passed to
the write callback in a single invoke.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Received on 2002-05-28