Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.9k views
in Java FTP by
I don't quite understand the meaning of a 'timeout of 0 ms' which is what the FTPClient defaults to if no timeout is set. Does this mean it will wait indefinitely? If not how can it wait for "zero milliseconds"?

7 Answers

0 votes
by (162k points)
It's a Java default for sockets which means indefinite.

I don't quite understand the meaning of a 'timeout of 0 ms' which is what the FTPClient defaults to if no timeout is set. Does this mean it will wait indefinitely? If not how can it wait for "zero milliseconds"?
0 votes
by
It's a Java default for sockets which means indefinite.

I don't quite understand the meaning of a 'timeout of 0 ms' which is what the FTPClient defaults to if no timeout is set. Does this mean it will wait indefinitely? If not how can it wait for "zero milliseconds"?


So I don't understand ,why my connection closed after 900 sec ?
If timeout is set to 0?
0 votes
by (162k points)
This is a timeout for socket reads. It is not related to an FTP server timing you out afer 900s of inactivity.

It's a Java default for sockets which means indefinite.

I don't quite understand the meaning of a 'timeout of 0 ms' which is what the FTPClient defaults to if no timeout is set. Does this mean it will wait indefinitely? If not how can it wait for "zero milliseconds"?


So I don't understand ,why my connection closed after 900 sec ?
If timeout is set to 0?
0 votes
by
This is a timeout for socket reads. It is not related to an FTP server timing you out afer 900s of inactivity.

It's a Java default for sockets which means indefinite.

I don't quite understand the meaning of a 'timeout of 0 ms' which is what the FTPClient defaults to if no timeout is set. Does this mean it will wait indefinitely? If not how can it wait for "zero milliseconds"?


So I don't understand ,why my connection closed after 900 sec ?
If timeout is set to 0?

So may be You can explain,what can i do for the preventing connection closing?
0 votes
by (162k points)
Sure. Do something to let the server know you are alive. Call NoOp() for example.

So may be You can explain,what can i do for the preventing connection closing?
0 votes
by
NoOp()? I'm not seeing NoOp() as a Method for FTPClient in C#. I'm looking for something to keep my connection alive. I'm also looking for a Property to show me whether i am connected or not. For instance, After a FTPClient.Get() I want to say if (!FTPClient.Connected) { reonnect(); } Any suggestions?

Thanks!
0 votes
by
I'm sorry I didn't realize I was in Java until After I posted!

Categories

...