Closed xuyiqun-learner closed 1 year ago
If the question is to know how to use ProgressFunction, I currently use this code (file download) :
request.setOpt<curlpp::options::ProgressFunction>(
[&location, &reporter](const double totalDownloaded, const double currentlyDownloaded, double, double)-> int
{
if (totalDownloaded != 0.0)
reporter(location.string(), static_cast<float>(currentlyDownloaded * 100.0l / totalDownloaded));
return CURL_PROGRESSFUNC_CONTINUE;
});
thanks
is the same usage of ReadFucnction as ProgressFunction that to get progress value in the example02 ?