Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5k views
in .NET FTP by (320 points)
I am using edtFTPNet/Free. If I pass an invalid IP Address to the connect method or the server is not on line my connect form hangs for a period of time until the connect() method finally times out.

Is this timeout interval settable via a property? If so, what is the property.

If the interval is not settable, I would like to know how I can stop the connect process myself after a given amount of time. I'm thinking of that I need to spin the connect() command off asynchronously. I would like to start the thread using BeginInvoke and then start my own timer. I'm hoping that I can poll the IsConnected property while edtFTPNet/Free is attempting to connect. How can I stop the connect process. Can I do it with an EndInvoke call or do I have to terminate my thread another way?

Thanks,
Ira Idelson

2 Answers

0 votes
by (162k points)
If you are using the latest version, the timeout applies to Connect().

However the DNS resolution of the hostname does not have a timeout (and that is done in Connect()). So it is possible that this is causing the hang.

Use the IP address rather than the hostname to confirm this.
0 votes
by (320 points)
Bruce,

Thanks, I found the timeout command. It helps a lot.

Ira

Categories

...