Login  
Search All Forums
Dart Home | C++ Professional Toolkit | Custom Development Reply | C++ Professional Toolkit Topics | Forums   
AuthorForum: C++ Professional Toolkit
Topic: FTP and Filecopy contention
funny
ge_nan@hotmail.com

From: Mahwah, NJ USA
Posts: 5
Member Since: 11/07/02
posted October 11, 2004 9:18 AM

I have a problem in one of our monitoring program. When the monitor program is trying to copy files from target server during its FTP process to another server on the same file, a contention will occur, the FTP process on the target server will hang. What method could I use to prevent this type of lock?

Thank you very much in advance.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted October 11, 2004 5:29 PM

I'm not sure what you mean by "the FTP process on the target server will hang".

Are you saying you get no error from our control? If so it means that the server is not closing the connection.

If that's the case you would have to implement some sort of activity timer that aborts if the events stop firing.

funny
ge_nan@hotmail.com

From: Mahwah, NJ USA
Posts: 5
Member Since: 11/07/02
posted October 12, 2004 9:12 AM

Tony, thank you very much for the response. And maybe I could explain better this way:

Workstation A is trying to get a file from Server A when Server A is FTPing to Server B, the file might be in use by Server A, so Server A FTP process is into the hang mode without any error code.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted October 12, 2004 9:24 AM

I'm guessing the server is never closing the connection.

Since you are using PowerTCP Pro, which is asynchronous, and therefore has no concept of a timeout, it appears like the transfer is hanging.

You are going to have to implement your own timeout mechanism. I believe the sample FTP program demonstrates one way to do this.
funny
ge_nan@hotmail.com

From: Mahwah, NJ USA
Posts: 5
Member Since: 11/07/02
posted October 12, 2004 10:28 AM

Thank you, Tony.
Reply | C++ Professional Toolkit Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX