Re: [twsocket] Aborting PUT
> Only remaining is the Resume option. Thanks for the suggestion. > Question: With TFtpClient to Resume transfer do I have to know > the remote file size ? You only have to know the position from which you want to resume, ie the size of the file partially downloaded. But unless you know the expected size, you won't know whether you need to resume. You can get into a loop if you resume a file from the end. You'll see a lot of checks in TMagFtp and they are necessary, if you want robust downloads. TMagFtp does use sync methods, but there is a threaded version which I've tested with a few hundred simultaneous FTP sessions. So I've never seen a reason to rewrite something already solid as async and debug and test it all again. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Aborting PUT
I was looking at TMagFtp and yes it does everything. But I have already done most of my modules in Async type coding. Only remaining is the Resume option. Thanks for the suggestion. Question: With TFtpClient to Resume transfer do I have to know the remote file size ? RegardsAllan From: Angus Robertson - Magenta Systems Ltd <an...@magsys.co.uk> To: twsocket@lists.elists.org Sent: Friday, 16 June 2017 3:38 PM Subject: Re: [twsocket] Aborting PUT > I have a backup application that I am revamping. You got me > right, I am using both the Client and Server modules as my > application is loaded on Source machine and Destination too. I > get your point that I will have to work from the Client side > majorly and not from the Server side.Thanks I will do just that. You will find the TMagFtp component works very closely with the ICS web server, for bulk file uploads and downloads, with all the automated file checking and resumed uploads handled automatically, and extensively tested for 12 years. In particular they use special commands to index sub-directories, so a single FTP call will return a list of thousands of sub-directories, whereas a normal FTP server would need to list each one separately with thousands of commands. Suggest you test the compiled xferdemo3.exe demo against the ICS FTP server sample. It will save you a lot of development effort. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Aborting PUT
> I have a backup application that I am revamping. You got me > right, I am using both the Client and Server modules as my > application is loaded on Source machine and Destination too. I > get your point that I will have to work from the Client side > majorly and not from the Server side.Thanks I will do just that. You will find the TMagFtp component works very closely with the ICS web server, for bulk file uploads and downloads, with all the automated file checking and resumed uploads handled automatically, and extensively tested for 12 years. In particular they use special commands to index sub-directories, so a single FTP call will return a list of thousands of sub-directories, whereas a normal FTP server would need to list each one separately with thousands of commands. Suggest you test the compiled xferdemo3.exe demo against the ICS FTP server sample. It will save you a lot of development effort. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Aborting PUT
I have a backup application that I am revamping. You got me right, I am using both the Client and Server modules as my application is loaded on Source machine and Destination too. I get your point that I will have to work from the Client side majorly and not from the Server side.Thanks I will do just that. From: Angus Robertson - Magenta Systems Ltd <an...@magsys.co.uk> To: twsocket@lists.elists.org Sent: Friday, 16 June 2017 12:47 PM Subject: Re: [twsocket] Aborting PUT > From what I gather is that MagFTP is the Client Side. For client > side I will refer your logic, Thanks. My requirement is for the > Server Side. I can also pass the command from Client side to the > Server to do the rename but I thought Server doing the Rename > would be faster and would also help my flow of logic. So can I > get actual Filesize on the server side ? Sorry, I thought you were writing both client and server. The server has no concept of what was supposed to be uploaded and can not check anything. Partial uploads were common in the days of dial-up internet and now with flakey mobile connections. But it's the client's job to check the server has received the file correctly, with CRC, file size, etc. Don't delete a partially uploaded file, the client may want to resume the upload, which TMagFtp handles. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Aborting PUT
> From what I gather is that MagFTP is the Client Side. For client > side I will refer your logic, Thanks. My requirement is for the > Server Side. I can also pass the command from Client side to the > Server to do the rename but I thought Server doing the Rename > would be faster and would also help my flow of logic. So can I > get actual Filesize on the server side ? Sorry, I thought you were writing both client and server. The server has no concept of what was supposed to be uploaded and can not check anything. Partial uploads were common in the days of dial-up internet and now with flakey mobile connections. But it's the client's job to check the server has received the file correctly, with CRC, file size, etc. Don't delete a partially uploaded file, the client may want to resume the upload, which TMagFtp handles. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Aborting PUT
From what I gather is that MagFTP is the Client Side. For client side I will refer your logic, Thanks. My requirement is for the Server Side. I can also pass the command from Client side to the Server to do the rename but I thought Server doing the Rename would be faster and would also help my flow of logic. So can I get actual Filesize on the server side ? RegardsAllan From: Angus Robertson - Magenta Systems Ltd <an...@magsys.co.uk> To: twsocket@lists.elists.org Sent: Thursday, 15 June 2017 4:17 PM Subject: Re: [twsocket] Aborting PUT > How does Server understand that FtpClient Aborted the PUT. In > 'OnStorSessionClosed' 'Error=0'. > > My intention is that at PUT of a file I rename the HostFilename > to Filename$$ and when completely received at Server side Server > will rename it back to 'Filename' by removing the ending $$. > Sorry for all the trouble I am giving you. Suggest you look at the source code for TMagFtp at: https://www.magsys.co.uk/delphi/magxfer.asp which does all this already. Generally, you check the correct sized file has arrived, and perhaps run a CRC or MD5 check on it, to check it's not corrupted before renaming it to the final name, if the server supports such commands. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Aborting PUT
> How does Server understand that FtpClient Aborted the PUT. In > 'OnStorSessionClosed' 'Error=0'. > > My intention is that at PUT of a file I rename the HostFilename > to Filename$$ and when completely received at Server side Server > will rename it back to 'Filename' by removing the ending $$. > Sorry for all the trouble I am giving you. Suggest you look at the source code for TMagFtp at: https://www.magsys.co.uk/delphi/magxfer.asp which does all this already. Generally, you check the correct sized file has arrived, and perhaps run a CRC or MD5 check on it, to check it's not corrupted before renaming it to the final name, if the server supports such commands. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be