I have a download method from a library that accepts callback
function for handling percents of downloaded file.
$cb = function ($percent) {
echo $percent;
};
$info = $MadelineProto->download_to_dir($messageMediaPhoto, 'assets', $cb);
But it only echos 100 at the end. How can I get the all percents? How can it be done in a blocking io language?