Dart Home | PowerTCP SSL for ActiveX | Custom Development | Reply | PowerTCP SSL for ActiveX Topics | Forums |
Author | Forum: PowerTCP SSL for ActiveX Topic: Can FTP Server tell if RETR was aborted by client |
mmchenry From: Fort Lauderdale, FL USA Posts: 25 Member Since: 10/13/03 |
posted November 26, 2003 1:00 PM I'm using the secure FTP server and client controls. In the server's Retrieve event, I'm checking Request.Completed to tell if the transfer completed and do some additional processing on the server. I only want to do the addtional server side processing if the transfer was successfully completed. This works great except when the client issues AbortCommand or the client's network connection is lost during a transfer. Request.Completed is True after an abort or dropped connection as well as after normal completion. Is there any way for the server to tell the difference? Any suggestions? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 1, 2003 12:20 AM Request.Completed is not used to tell you if the transfer was successful. It was added later so that we could allow people to know whether the event is firing at the beginning or the end of the process. If you want to tell whether the transfer was aborted, I would suggest comparing the file sizes of what you expected and what is actually there. |
mmchenry From: Fort Lauderdale, FL USA Posts: 25 Member Since: 10/13/03 |
posted December 1, 2003 12:27 PM How would the server be able to compare file sizes? If the client issues a RETR then issues AbortCommand during the transmission, the request complete event will fire. Are you saying at that point that there's some way for the server to compare file sizes or know how many bytes were actually sent? Or is my only option to have the client somehow (custom command?) notify the server that the transmission was successful? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted December 1, 2003 1:02 PM I was thinking you would know the file size from the Request object, but I guess I am mistaken. At this point I am not sure what else to suggest. By definition the transfer is complete if the data connection closed. Maybe you can save the file name to some global variable, then if you can somehow detect that the transfer was aborted, delete the file. |
Reply | PowerTCP SSL for ActiveX Topics | Forums |
This site is powered by
![]() |