Home » U++ Library support » U++ MT-multithreading and servers » knowing download speed and ProgressIndicator
Re: knowing download speed and ProgressIndicator [message #17168 is a reply to message #17161] |
Fri, 01 August 2008 09:17 |
TeCNoYoTTa
Messages: 138 Registered: July 2008 Location: Egypt
|
Experienced Member |
|
|
thanks
i tried what you said but there still errors this is the code
void Download_Manager_Window::progress_indecator(int x, int all)
{
static int timer = 0;
static int data = 0;
progress_bar.Set(x,all);
timer = clock() - timer;
data = x - data;
label_DownloadSpeed.SetText(DblStr((data/timer) * 1.0 ) + " KB/S");
timer = clock();
data = x;
}
void Download_Manager_Window::Download_File(String link)
{
client.URL(link);
client.ExecuteRedirect(HttpClient::DEFAULT_MAX_REDIRECT,HttpClient::DEFAULT_RETRIES,THISBACK( progress_indecator ));
}
and this is the error
D:\Program Files\MyApps\CISL\main.cpp: In member function 'void Download_Manager_Window::Download_File(Upp::String)':
D:\Program Files\MyApps\CISL\main.cpp:60: error: no matching function for call to 'Upp::HttpClient::ExecuteRedirect(Upp::HttpClient::<anon
ymous enum>, Upp::HttpClient::<anonymous enum>, Upp::Callback2<int, int>)'
D:\Program Files\upp\uppsrc/Web/httpcli.h:41: note: candidates are: Upp::String Upp::HttpClient::ExecuteRedirect(int, int, Upp::Gate2<int,
int>)
|
|
|
Goto Forum:
Current Time: Mon Apr 29 03:58:01 CEST 2024
Total time taken to generate the page: 0.07057 seconds
|