curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Couple cuestions about CURLOPT_WRITEFUNCTION callback

From: Patrick Monnerat <patrick_at_monnerat.net>
Date: Mon, 13 Feb 2017 14:18:46 +0100

On 02/13/2017 01:50 PM, David Requena wrote:
> Hi all,
>
> I'm having a hard time understanding size_t size, size_t nmemb
> parameters of this callback.
>
> 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.

Patrick
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-13