Click to See Complete Forum and Search --> : Resume Download Logic
oceanebelle
Jun 20th, 2006, 12:07 AM
What is the logic for download applications such that when a client's download gets disconnected they can continue with the download?
ComputerJy
Jun 20th, 2006, 06:43 AM
They store the content in a temporary file with a LOCCTR that tells how much exactly was downloaded, so when you resume, they how many bytes to skip
EDIT:LOCCTR (Location Counter)
oceanebelle
Jun 20th, 2006, 09:58 PM
is there any particular format for the LOCCTR?
does this means two files will be saved?, i still don't get the whole picture though.
ComputerJy
Jun 21st, 2006, 06:38 AM
is there any particular format for the LOCCTR?
does this means two files will be saved?, i still don't get the whole picture though.
I don't know how is the "LOCCTR" built, I just know the concept!
No, not 2 files, as soon as download is done data stored in the temp file is formatted and replaced with the original file
penagate
Jun 21st, 2006, 06:43 AM
It depends how the file is downloaded. If it's HTTP, it will most likely be sequential, you can simply store the number of bytes downloaded and resume from that point (HTTP supports resumption from a specified point). If you look at BitTorrent, the files are downloaded in chunks, not in any particular order but rather by availability within the swarm, so you need to keep track of each chunk (BT uses a hash table for this). For a custom protocol, it could be different again.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.