curl-library
Re: How to get downloading progress using multi interface?
Date: Tue, 7 Aug 2007 22:47:01 +0200 (CEST)
On Tue, 7 Aug 2007, Alexander Zubko wrote:
> Is it possible to get downloaded number of bytes for every active Curl
> object in multi interface not using CURLOPT_PROGRESSFUNCTION callback as it
> is not recomended in docs?
The reason is I say CURLOPT_PROGRESSFUNCTION shouldn't be needed when you use
the multi interface is simply that you (should) have all the info already
yourself, so why wait for libcurl to call a function of course so that you can
display or get progress data, when you already have that data!
You can still use it perfectly fine exactly the same way with the multi
interface as with the easy.
Also, when doing it yourself you get more control exactly when and how often
the function is called.
Regarding the following suggestion about needing a mutex: no you don't. The
multi interface is completely single-threaded so there is no need for mutexes
on libcurl's behalf.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-08-07