the callback that receives the (total bytes to download, currently downloaded bytes, total bytes to upload, currently uploaded bytes).
Return 0 from the callback to signal success, return non-zero to abort transfer
import std.net.curl, std.stdio; Curl curl; curl.initialize(); curl.set(CurlOption.url, "http://dlang.org"); curl.onProgress = delegate int(size_t dltotal, size_t dlnow, size_t ultotal, size_t ulnow) { writeln("Progress: downloaded bytes ", dlnow, " of ", dltotal); writeln("Progress: uploaded bytes ", ulnow, " of ", ultotal); return 0; }; curl.perform();
The event handler that gets called to inform of upload/download progress.