curl-library
Re: returning -1 to CURLOPT_WRITEFUNCTION
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 15 Oct 2001 15:56:05 +0200 (MET DST)
Date: Mon, 15 Oct 2001 15:56:05 +0200 (MET DST)
On Mon, 15 Oct 2001, jonatan wrote:
> >The return code doesn't really matter, as returning anything other than the
> >actually passed in size will make libcurl return CURLE_WRITE_ERROR.
>
> can i assume that the function will never be called with 0 bytes, so that
> returning 0 instead of -1 will signal error?
Yes, the write function will only be called when there actually exists data
to write. It will only be called with a non-zero size.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-10-15