Difference between ftp apache setDefaultimeout (), setSoTimeout () and setDataTimeout ()

The following blog explains that ftp apache comments on net libaray for different wait times - setDefaultTimeout (), setSoTimeout (), setDataTimeout ().

http://sudhirvn.blogspot.in/2007/05/ftpclient-timeout-values.html

But please clarify my following doubts: WRT the above timeouts?

a) Does setSoTimeout () set a timeout only for connecting ftp control, and not for connecting data?

b) Does setDataTimeout () set a timeout only for ftp data connection and does not control the connection? (I ask about this because it uses the base java.net.Socket.setSoTimeout ())

c) If we set setDefaultTimeout (), we do not need to set / use setSoTimeout () and setDataTimeout (), as the blog says that 'setDefaultTimeout () is used by default for all connections created using this FTPClient instance.'

d) Also need to set the connection timeout? if we do not install it, will the program rely on disabling system connection timeouts?

Thanks in advance:)

+4
source share
1 answer

Three methods trigger a setSoTimeout () call at the socket level.

setDefaultTimeout() socket.setSoTimeout() . 0, -. FTPClient.setSoTimeout() , SO_TIMEOUT .

setDataTimeout() - . , 0 ( ).

, - ().

, , , - - , , , .

+4

Source: https://habr.com/ru/post/1543548/


All Articles