1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 09:21:50 -05:00
Christopher Head 9526cbe6bc
docs/CURLOPT_WRITEFUNCTION: size is always 1
For compatibility with `fwrite`, the `CURLOPT_WRITEFUNCTION` callback is
passed two `size_t` parameters which, when multiplied, designate the
number of bytes of data passed in. In practice, CURL always sets the
first parameter (`size`) to 1.

This practice is also enshrined in documentation and cannot be changed
in future. The documentation states that the default callback is
`fwrite`, which means `fwrite` must be a suitable function for this
purpose. However, the documentation also states that the callback must
return the number of *bytes* it successfully handled, whereas ISO C
`fwrite` returns the number of items (each of size `size`) which it
wrote. The only way these numbers can be equal is if `size` is 1.

Since `size` is 1 and can never be changed in future anyway, document
that fact explicitly and let users rely on it.

Closes #2787
2018-07-26 16:24:43 +02:00
..
2018-02-23 23:29:01 +00:00
2018-03-12 00:34:33 +01:00
2018-04-15 03:05:45 -04:00
2018-06-12 12:08:40 +02:00
2017-12-06 00:12:48 +01:00
FAQ
2018-03-12 18:17:05 +00:00
2017-09-07 09:51:25 +02:00
2016-11-15 15:41:45 +01:00
2018-06-03 12:14:45 +00:00
2011-12-30 03:53:25 +01:00
2017-12-04 09:15:39 +01:00
2017-10-28 10:54:20 +02:00
2018-07-11 07:57:42 +02:00
2018-04-06 15:52:19 +02:00
2015-06-10 00:21:06 +02:00

curl logo

Documentation

You'll find a mix of various documentation in this directory and subdirectories, using several different formats. Some of them are not ideal for reading directly in your browser.

If you'd rather see the rendered version of the documentation, check out the curl web site's documentation section for general curl stuff or the libcurl section for libcurl related documentation.