curl-library
Re: retreive messages
Date: Thu, 3 Jan 2002 19:49:31 +0100 (MET)
On Thu, 3 Jan 2002, raoul cridlig wrote:
> > I'm seriously consider passing each received "response line" (one at a
> > time) as header data to the callback function you set with
> > CURLOPT_HEADERFUNCTION.
> I think that it should not be retreived in the same buffer as chunk.memory.
> Because, when u list a directory, and write it to chunk.memory(with
> WriteCallBackFunction), u don't want to see anything else inside(like
> response lines).
The callback you get the FTP data in, is the CURLOPT_WRITEFUNCTION. I'm
talking about sending the response-lines to the function you set with
CURLOPT_HEADERFUNCTION.
That way, you write two functions, one for true data and one for meta data.
It makes it work similarly to HTTP as then the headers are passed to the
CURLOPT_HEADERFUNCTION and the actual data to the CURLOPT_WRITEFUNCTION.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-01-03