cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Prevent copying of data between curl buffer and user provided buffer

From: Bharath Devanathan <bharathd_at_yahoo-inc.com>
Date: Tue, 11 Oct 2005 01:19:33 -0700

>I wouldn't consider that the 'ideal' solution either as that
>would simply be
>too retrictive and require that the app already knows the size
>of the remote
>file or similar.

I agree that this is not a generic feature, but one that can be used when
apps have specific knowledge that can be exploited.
>
>If there would be such a function (or functionS - plural -
>since there is an
>equivalent case for uploads) I would rather have a way for the app to
>repeatedly provide buffer space for the next downloaded chunk
>to get stored
>into, and for each write to the buffer it would call the
>callback to allow the
>application to provide more buffer(s).

Good idea. I would extend that a bit further and also provide an api where
the app provides a single pointer and a buffer pool or simply redefines
realloc.

>You feel up to working on such a feature?
Yes, how can i get started?

>
>--
> Commercial curl and libcurl Technical Support:
>http://haxx.se/curl.html
>
>
Received on 2005-10-11