Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6k views
in Java FTP by
How can I know if the connection was closed?
You can implement in FTPClient class a public method that returns a socket.

Doing this I would do:
socket.isClosed()

Thanks!

Jorge

2 Answers

0 votes
by
Which connection, the control socket I assume?

We can add a method

public boolean isControlClosed()

will that do what you want?


How can I know if the connection was closed?
You can implement in FTPClient class a public method that returns a socket.

Doing this I would do:
socket.isClosed()

Thanks!

Jorge
0 votes
by
I want to know if the ftp server connection was aborted. This can occur when a IOException or FTPException ocurred.

Thanks!

Jorge

Which connection, the control socket I assume?

We can add a method

public boolean isControlClosed()

will that do what you want?


How can I know if the connection was closed?
You can implement in FTPClient class a public method that returns a socket.

Doing this I would do:
socket.isClosed()

Thanks!

Jorge

Categories

...