ParticleFtpClient - check client connection

I am using the ParticleFtpClient library with a Photon to access an FTP server. There is a lot of time lost in authentication so since the FTP server is under my control, is there a way to check first if the client is still connected? This way I can avoid having to reconnect ...

BTW, I tried this but it did not work:

if (ftp.connected())
{

}

Is there something wrong?

1 Like

I also plan on using this library so Iā€™m interested in your question also.

Are you mainly uploading or downloading from the FTP server?

How large are the files normally?

How reliable are the transfers?

Hi @RWB,

I was just going to respond to my own post when I read yours.

I changed my server to FileZilla and now everything works.

As to your questions:

Are you mainly uploading or downloading from the FTP server?

Uploading

How large are the files normally?

Very small, < 30KB

How reliable are the transfers?

Very reliable (but a bit time consuming). Not having to reconnect saves about 4 seconds on the Photon.

Good to know.

Have you tried this with a hosted FTP server vs an FTP server running from your computer?

Wondering if there are any differences?

No, I am hosting the FTP Server.

@ScruffR recommends (and I agree) that it may be better to run your own TCP server to avoid the FTP connection overhead.

Also, using an Electron as an FTP client is a lot slower ā€¦