|
-
Jun 20th, 2006, 12:07 AM
#1
Thread Starter
Frenzied Member
Resume Download Logic
What is the logic for download applications such that when a client's download gets disconnected they can continue with the download?
-
Jun 20th, 2006, 06:43 AM
#2
Re: Resume Download Logic
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)
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 20th, 2006, 09:58 PM
#3
Thread Starter
Frenzied Member
Re: Resume Download Logic
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.
-
Jun 21st, 2006, 06:38 AM
#4
Re: Resume Download Logic
 Originally Posted by oceanebelle
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
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 21st, 2006, 06:43 AM
#5
Re: Resume Download Logic
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|