title: How does the socket connect timeout work?
body: <p>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. </p>
  
  <p>So what is the functionality of connection timeout in Java socket when we call <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html#connect%28java.net.SocketAddress,%20int%29" rel="nofollow"><code>Socket.connect(endpoint, connectTimeout)</code></a></p>