curl-library
Re: Progress
Date: Mon, 19 Feb 2001 03:45:22 GMT
hi Bob.
Thanks for the help.
This is how i did. (Please let me know if i did it wrong...)
Now the question is how to use the variables...
Do i use timer??
//------------------------------------
int mycallback(void *notused, size_t d_tot, size_t d_now,
size_t u_tot, size_t u_now);
size_t dltotal;
size_t dlnow;
size_t ultotal;
size_t ulnow;
int progret = 0;
//------------------------------------
void Upload(...) {
...
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, mycallback);
...
}
//------------------------------------
int mycallback(void *notused, size_t d_tot, size_t d_now,
size_t u_tot, size_t u_now)
{
dltotal = d_tot;
dlnow = d_now;
ultotal = u_tot;
ulnow = u_now;
return progret;
}
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-02-19