1
votes

Is it possible to transfer files through FTP using the library above in an ACTIVE FTP mode?

It takes my app 13 seconds to move the 5KB file over - when I traced the code, turned out that the majority of these 13 seconds is spent on "sleeping" : time between "entering passive mode: 227" and "data transfer started", it was a good 8 seconds.

Any way to use this lib differently? I just use GetFile function as is.

2

2 Answers

1
votes

Sorry, I don't know anything about OpenNETCF's FTP component.

We're using the FTP/FTPS component (commercial) by Rebex (http://www.rebex.net). It's really great! If you can spend a few bucks, I'd suggest to give it a try.

0
votes

The main problem with that lib (if it is the one i'm thinking of) is the sync comms implemented via sleeps and yes you can sleep for longer than necessary. Is it socket based? I forget but on some (all?) CE devices you can't sync send with a timeout which means you write code that can hang (no timeout) so sleeps are actually the better bet in this scenario!!!???!!!. I did ground-up rewrite this lib to be async but the client on that one wouldn't allow me to contribute the code back. :(

If it is the one with the source up on the open net cf forums then just grab the code and reduce the sleeps if your network is teh awesomes, the issue with this kind of solution is that you might "miss" a success if your sleep is too short or the network gets a little clogged up as you didn't wait long enough before touching your receive buffer.

Failing that rewrite with async or look elsewhere!