Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to resume the file download

How to resume the file download

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadminalgorithmshelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gowrishankar A
    wrote on last edited by
    #1

    Problem: while downloading a huge file from a ftp server, if my service lost the connection in between, how can i resume the download? The problems are 1: Since it is a huge file, it is not a good idea to restart the download. 2: If we are download by parts in different threads, then each thread should have different connection. This will not work when the server restricts the number of users. Anybody please suggest a better algorithm for this.

    B R 2 Replies Last reply
    0
    • G Gowrishankar A

      Problem: while downloading a huge file from a ftp server, if my service lost the connection in between, how can i resume the download? The problems are 1: Since it is a huge file, it is not a good idea to restart the download. 2: If we are download by parts in different threads, then each thread should have different connection. This will not work when the server restricts the number of users. Anybody please suggest a better algorithm for this.

      B Offline
      B Offline
      bryce
      wrote on last edited by
      #2

      that depends on whether the ftp server runs a version of ftp which allows resumes AND you have an ftp client which also supports Resume cheers bryce --- Publitor, making Pubmed easy. http://www.sohocode.com/publitor

      1 Reply Last reply
      0
      • G Gowrishankar A

        Problem: while downloading a huge file from a ftp server, if my service lost the connection in between, how can i resume the download? The problems are 1: Since it is a huge file, it is not a good idea to restart the download. 2: If we are download by parts in different threads, then each thread should have different connection. This will not work when the server restricts the number of users. Anybody please suggest a better algorithm for this.

        R Offline
        R Offline
        Redeemer dk
        wrote on last edited by
        #3

        To resume a download you need to use the REST command: REST The REST command will make the server start at a give byte offsett and not at the start of the file. When you send that command the server will reply with either a negative response, or the code 350, which means it will start at the byte offsett you've specified. NOTE: The REST command must be followed by a service command (RETR or STOR). -Rune SVendsen

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups