Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.6k views
in Java FTP by
I'm creating an FTP client.
I'm running into FTP TimeOut Exceptions when I want to transmit files too long after login.
This is normal.
What is the fastest way to keep on transferring when exception is thrown?
Should I just logout and login, or is there a faster way (time is the essence!)

3 Answers

0 votes
by (162k points)
Ideally, don't timeout, e.g. execute a harmless command such as GetWorkingDirectory() every x minutes to prevent a timeout.

I'm creating an FTP client.
I'm running into FTP TimeOut Exceptions when I want to transmit files too long after login.
This is normal.
What is the fastest way to keep on transferring when exception is thrown?
Should I just logout and login, or is there a faster way (time is the essence!)
0 votes
by
One of the servers I'm testing my client on has a timeout of one minute. As the timeout varies with every server, sending a command every x seconds probably will get the job done, but isn't good programming practice. As one of the feathures of my program allows you to transmit files after a certain time delay (do it while you're working on other stuff instead of waiting for each transfer to complete), sending a doNothing command every thirty seconds for several hours will clog up the server.
Is there a way of actually reenabling commands without reconnecting?
0 votes
by (51.6k points)
Are you asking if there's a way to execute a command without having an open connection then the answer is definitely no. Short of reconfiguring the server, there is no standardized way of keeping a connection alive, so I think you're stuck with sending doNothings or reconnecting using connect() and login().

- Hans (EDT)

Categories

...