From cda16297d141ab5f6d68050b5541f0362cd3de04 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 5 Mar 2002 09:01:58 +0000 Subject: [PATCH] added text to the progress chapter --- docs/libcurl-the-guide | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/libcurl-the-guide b/docs/libcurl-the-guide index f0f5a79d6..c6c1cea6b 100644 --- a/docs/libcurl-the-guide +++ b/docs/libcurl-the-guide @@ -470,7 +470,30 @@ HTTP POSTing Showing Progress - [ built-in progress meter, progress callback ] + For historical and traditional reasons, libcurl has a built-in progress meter + that can be switched on and then makes it presents a progress meter in your + terminal. + + Switch on the progress meter by, oddly enough, set CURLOPT_NOPROGRESS to + FALSE. This option is set to TRUE by default. + + For most applications however, the built-in progress meter is useless and + what instead is interesting is the ability to specify a progress + callback. The function pointer you pass to libcurl will then be called on + irregular intervals with information about the current transfer. + + Set the progress callback by using CURLOPT_PROGRESSFUNCTION. And pass a + pointer to a function that matches this prototype: + + int progress_callback(void *clientp, + double dltotal, + double dlnow, + double ultotal, + double ulnow); + + If any of the input arguments is unknown, a 0 will be passed. The first + argument, the 'clientp' is the pointer you pass to libcurl with + CURLOPT_PROGRESSDATA. libcurl won't touch it. libcurl with C++