默认无限。public void connect(SocketAddress endpoint,
int timeout)
throws IOException
Connects this socket to the server with a specified timeout value.
A timeout of zero is interpreted as an infinite timeout.
The connection will then block until established or an error occurs.
Parameters:
endpoint - the SocketAddress
timeout - the timeout value to be used in milliseconds.
int timeout)
throws IOException
Connects this socket to the server with a specified timeout value.
A timeout of zero is interpreted as an infinite timeout.
The connection will then block until established or an error occurs.
Parameters:
endpoint - the SocketAddress
timeout - the timeout value to be used in milliseconds.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货