开发者

How does the socket connect timeout work?

To my understanding, the socket connection timeout is controlled by the TCP transport, which uses Retransmission Timeouts (RTOs). if the the ack does not come back before timer expires, the connect request (Sync) will be retransmitted, and the RTO will be doubled.

So what is the 开发者_StackOverflowfunctionality of connection timeout in Java socket when we call Socket.connect(endpoint, connectTimeout)


So what is the functionality of connection timeout in Java socket when we call Socket.connect(endpoint, connectTimeout)

It sets an overall timeout for the connection to have been established; i.e. it says how long the application is prepared to wait for all of the packet-level timeouts, retransmissions, etc to succeed (or not) before giving up.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜