[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 401
  • Last Modified:

FTP resuming

in my application, i need to be able to have the ftp portion of it resume downloads if the connetion is broken.  it's currently an mfc app, but any help i can get will work.  mfc's CFtpConnection does not support this and i can't find any api function to do the trick. can someone lead me to the right answer?
0
rabbitears
Asked:
rabbitears
  • 2
1 Solution
 
rabbitearsAuthor Commented:
also, FtpGetFile and CFtpConnection's counterpart both support a cache, but if the cache is deleted..........
0
 
MikeP090797Commented:
I don't know if it can be implemented in CFtpConnection, but the FTP protocol has a REST command.
0
 
rabbitearsAuthor Commented:
so i'm going to have to work with some kind of "pure" ftp connection and send the actual commands to the server?  how do i build that kind of connection IF i can't do it they way i'm trying..
0
 
WxWCommented:
If you cannot find a function like REST , you should get the FTP socket from the CFTPConnection ( the class should have a member function to return you the socket ) , then pass the REST command manually using send() , and then attempt to download You should know how to use rest ( REST <size> )

There is a very important problem you might have : Some FTP servers recognize the REST command ONLY IF YOU SEND IT EXCACTLY BEFORE THE RETR command .

Usually FTP clients send first TYPE , PORT and RETR command . If CFtpConnection does not allow you to pass something before the RETR command , passing REST before the TYPE command , does not guarantee that the server will actually restart . It is server-depended .


0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now