[fpc-pascal] download manager

Geoffray Levasseur-Brandin jeff.levasseur at free.fr
Sun Dec 23 14:37:53 CET 2012


Hello everybody,

I'm currently trying to create a download manager with Synapse for an 
application I'm creating. As the application may need to download many big 
files from either ftp or http servers (it's a Linux package manager and a 
graphical installer for a distribution I'm creating with friends), I need to 
give good informations about download progress. The idea is to first get total 
size of the files to download (URL will be in a string list) then really 
downloads it (several downloads at a time if different servers/mirrors). The 
TDownloadManager class I'm creating will deal with that automatically using 
Threads.

With HTTP my problem is that I can't find the way to get the size of the file 
on the server while HTTPSend.DownloadSize is giving me the size of what have 
been downloaded.

Oppositely with FTP TFTPSend.GetFileSize is supposed to give me the total size 
of the file but I can't find the way to get the downloaded size to give 
progress.

Thank you very much for any help.
-- 
Geoffray Levasseur-Brandin <geoffray.levasseur-brandin at ac-toulouse.fr>
http://jeff.levasseur.tuxfamily.org/
GNU/PG : BF8BB8407CD26E89466CDA9BB1030FC59EF87775
Errare humanum est sed perseverare diabolicum aut cretinum.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20121223/f8ae1c2d/attachment.sig>


More information about the fpc-pascal mailing list