diff -r 7ef4b95f77b5 -r 38f221e53215 demo.lua --- a/demo.lua Sat Jan 02 05:57:36 2010 +0000 +++ b/demo.lua Sat Jan 02 06:04:12 2010 +0000 @@ -13,10 +13,11 @@ end local function progresscallback(batch) - for url,progress in pairs(batch:progress()) do + print("Progress:"); + for url, progress in pairs(batch:progress()) do print(url..":"); for statistic, value in pairs(progress) do - print("", k..": "..v); + print("", statistic..": "..value); end end print(""); @@ -24,6 +25,6 @@ batch_download = multihttp.new(mycallback, { "http://www.google.com/", "http://example.com/" }); -batch_download:set_progress_callback(progresscallback); +batch_download:set_progress_callback(progresscallback, 1); -- Call progresscallback every second batch_download:download(true); -- true means "don't return until all downloads are finished"