Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in .NET FTP by
I'm using edtFtpnet-1.2.6.
I found the property "IsConnected" of FtpClient Class is not always correct.

1 Answer

0 votes
by (51.6k points)
Unfortunately this is an inherent problem with TCP/IP. In fact there is no "connection" as such - not in the same way a wire connects a lamp to a wall-socket. Data is only transmitted between two ends of a "connection" when either side requests it. There is no way of knowing whether or not the other end has disappeared in between consecutive communications. The IsConnected property will therefore only tell you whether or not the most recent communication succeeded. The only way to increase the likelihood that IsConnected will be correct is to communicate more regularly. You may do this in edtFTPnet/Express by increasing the idle polling rate. If you want to do it in edtFTPnet/Free then you'll need to write some code that contacts the server every few seconds (in periods where it is otherwise idle).

- Hans (EnterpriseDT)

Categories

...