cURL / Mailing Lists / curl-library / Single Mail

curl-library

Process data with a call back before the entire web page has been downloaded.

From: David Moffatt <david_at_KnowNow.com>
Date: Thu, 13 Dec 2001 16:44:34 -0800

Hi,

I am trying to process a lot of very large web pages and I need to
process some of the page before the entire page is downloaded.
Is there a way to get the call back function called before the entire
web page is downloaded?

My WriteMemoryCallback() function does not get called until the entire
page is loaded. We are doing weird stuff so this causes a big problem.

I am using curl 7.9 for Solaris.

    curl_easy_setopt(curl_handle, CURLOPT_URL, subdata[0]);
    curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION,
WriteMemoryCallback);
    curl_easy_setopt(curl_handle, CURLOPT_HEADER, 0);
    curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
    curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "KnowNow Curl
1.0");

    /* get it! */
    res = curl_easy_perform(curl_handle);

[...]

David Moffatt
Performance and Load Engineer
KnowNow inc
100 View Street, Suite 100
Mountain View, CA 94041
Phone 650.475.8558
Received on 2001-12-14