DFL, Progress Bar, and how to use it against a download

Lester L. Martin II Lester at ewam-associates.com
Sun Nov 18 02:09:49 PST 2007


Chris Miller Wrote:

> On Sat, 17 Nov 2007 11:11:38 -0500, Lester L. Martin II  
> <Lester at ewam-associates.com> wrote:
> 
> > Lester L. Martin II Wrote:
> >
> >> Hello,
> >> I could probably figure this out if I actually put some time to it but  
> >> I seldom have enough time to think such through perfectly.
> >> My question is how do you use DFL's progress bar with Tango's HTTPget  
> >> and display a progress.
> >> If anyone has an answer I would love to see it as this is going to be  
> >> needed really bad in the project I'm working on(maybe others will join)  
> >> and I'd rather not spend a whole day implementing this perfectly when  
> >> their is already a way to do it so I can put my attention to more  
> >> important things.
> >>
> >> Thanks in advance,
> >> Lester L. Martin II
> >
> > Or tango's httpclient; I think I know how I'm just not sure that when  
> > you call read with the delegate and length will read call the delegate  
> > and supply the array of specified length and do so until it gets through  
> > or will it read that length and stop and wait for you to call read again.
> > If anyone has an example with HttpClient and the delegate read thing I  
> > described I'd love to see it.  If it does require to call read more than  
> > once, how do you check that you have read everything and there is  
> > nothing more to read.
> >
> > Lester L. Martin II
> >
> 
> Not sure about Tango, but with the DFL ProgressBar, you can set the  
> 'maximum' property to the file size and update the 'value' property to the  
> current size downloaded.

So are you using phobos or your own socket implementation.
How would you use the socket for a HTTP connection if you are using sockets in you example.

Lester L. Martin II



More information about the Digitalmars-d-learn mailing list