CURLOPT_PROGRESSFUNCTION
but the modern and preferred callback is set with CURLOPT_XFERINFOFUNCTION
:xfer_callback
function must match this prototype:CURLOPT_NOPROGRESS
is set to 0 (zero), this callback function gets called by libcurl with a frequent interval. While data is being transferred it will be called frequently, and during slow periods like when nothing is being transferred it can slow down to about one call per second.CURLOPT_XFERINFODATA
:dltotal
is the total number of bytes libcurl expects to download in this transfer.dlnow
is the number of bytes downloaded so far.ultotal
is the total number of bytes libcurl expects to upload in this transfer.ulnow
is the number of bytes uploaded so far.CURLE_ABORTED_BY_CALLBACK
.CURLOPT_PROGRESSFUNCTION
worked identically but instead of taking arguments of type curl_off_t
, it used double
.)