Solved

FTP resuming

Posted on 1998-06-26
4
391 Views
Last Modified: 2013-12-03
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
Comment
Question by:rabbitears
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:rabbitears
ID: 1408791
also, FtpGetFile and CFtpConnection's counterpart both support a cache, but if the cache is deleted..........
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1408792
I don't know if it can be implemented in CFtpConnection, but the FTP protocol has a REST command.
0
 

Author Comment

by:rabbitears
ID: 1408793
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
 
LVL 6

Accepted Solution

by:
WxW earned 100 total points
ID: 1408794
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question