Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.7k views
in .NET FTP by (160 points)
Hi all,
I used in my compact framework application an exFTPconnection to connect a PPC (opticon H19, windows mobile 6.1) to an FTPserver .. all works very fine, but if the FTPserver crashes during an FTP upload the application on PPC hang on and I must reboot my PPC.
Is it a way to setting a TIMEOUT to prevent this situation ??

Tanks in advice
eKontar 8)

3 Answers

0 votes
by (162k points)
Unfortunately the CF doesn't support timeouts on many platforms.

You will probably need a second thread that calls Close(true) on the connection if it detects that the upload has hung. You could detect this via the BytesTransferred method - if it hasn't been called after x seconds.

FTPServers do crash very rarely though ...
0 votes
by (160 points)
Thankyou very much, Bruce, you have right: FTPserver DOES NOT crash, but you know the Murphy's law: if something can go wrong, it will ....
To prevent this situation I'll follow your hint .. Regretfully, I don't know HOW create a second thread (I'm developing this application in VB.net): can you give me some tips (any links ...) ?

best regards
eK
0 votes
by (162k points)
Here's a couple of links. If you've not done threading before it is a bit of a learning curve.

Some code: http://www.java2s.com/Code/VB/Thread/Thread-Basics.htm

MS link: http://msdn.microsoft.com/en-us/library ... 71%29.aspx

Categories

...