curl-library
Re: Couple cuestions about CURLOPT_WRITEFUNCTION callback
Date: Mon, 13 Feb 2017 14:47:43 +0100
2017-02-13 14:18 GMT+01:00 Patrick Monnerat <patrick_at_monnerat.net>:
>
> I understand actual data size is size * nmemb but why have it decomposed
>> like this? IOW: what are size and nmemb meant to convey themselves?
>>
>> The callback function prototype is compatible with the standard C
> procedure fwrite (https://linux.die.net/man/3/fwrite), which is the
> default write procedure (note that the default write data pointer is
> stdout). The parameters semantics is the same. See exlanation there.
When I call fwrite I know what the written items are, what their size is,
and how many of them there are. When in a callback I know how many items
I'm receiving and their sizes, but not what they are, unless specified in
the documentation.
Now, thanks to your response (and Patrik's), I understand this has no
significance at all in this instance. I gather it's just more convenient to
call fwrite and friends from my callback function with the given data.
-- Saludos / Regards, David Requena
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-13