Results 1 to 5 of 5

Thread: Resume Download Logic

  1. #1

    Thread Starter
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Exclamation 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?

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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

  3. #3

    Thread Starter
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    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.

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Resume Download Logic

    Quote 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

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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
  •  



Click Here to Expand Forum to Full Width