Re: Can I reset CURLOPT_WRITEFUNCTION?
Date: Mon, 26 Nov 2007 12:08:00 +0100 (CET)
On Mon, 26 Nov 2007, Michael Hecker wrote:
> I'm reusing a connection to perform several requests. I only need the data
> of the second request so I set CURLOPT_WRITEFUNCTION for that request.
> Afterwards there are two other requests and I don't need the data data of
> theses requests. Can I somehow reset/disable CURLOPT_WRITEFUNCTION? Or is it
> basically unnecessary, because there is no diference in the speed anyway?
You do requests with libcurl and they transfer data down to your host.
You control what function that shall receive the data with
CURLOPT_WRITEFUNCTION. "disabling" it won't change that the data is still
transfered. The default write function is to write the data to stdout and that
is very rarely what an application wants...
I would suggest that you just make sure that your function ignores the data it
gets for the requests in which it doesn't care about it!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-11-26