curl-library
Re: mmap & file uploads
Date: Thu, 31 May 2001 00:33:00 -0400
Daniel Stenberg wrote:
> On Wed, 30 May 2001, Sterling Hughes wrote:
>
>
>>>It could possibly look like this:
>>>
>>> size_t read_file(void *clientp, size_t size, unsigned char **bufptr);
>>>
>>Looks good. Is there any reason to have 'unsigned char *' instead of
>>'void *' or 'char *' here?
>>
>
> No. :-)
>
> I figure we should use the same as read()/write() does, and they definitely
> use 'void *' and so should probably we do too.
>
I agree.
> Anyone with a good idea of for decent name for this new option? The current
> one is named CURLOPT_READFUNCTION and all other callback options also have
> names ending with 'FUNCTION'. READ_NO_COPY_FUNCTION ? READ_FAST_FUNCTION ?
>
not me :)
CURLOPT_OPTIMIZED_READFUNCTION?
> Speaking of decreasing the amount copies when doing upload, we could very
> well have a stab at downloads at the same time, right? When downloading to a
> file, I don't think we can gain much as then the callback would only write
> the data to a file, but when the callback wants to append the data to have
> the result in a large chunk of memory, we could save a copy if the
> application tells the library where to store data and how much data it can
> fit there. The application would then of course want to change the store
> pointer and size after each write callback to refer to the new place to store
> the stuff...
>
I think I understand what you mean here, could you clarify it a little bit with
some psuedo code of how this might work from a users point of view?
-Sterling
-- Sterling Hughes sterling_at_designmultimedia.com http://www.designmultimedia.com/ _______________________________________________ Curl-library mailing list Curl-library_at_lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/curl-libraryReceived on 2001-06-01