Can any one help me in setting the connection time out in java. I have this piece of code.
SSLSocket sslSocket = new SSLSocket(host, port, context); sslSocket.startHandshake();
I know that there is a line which we can add before stating hand shake sslSocket.setSoTimeout(timeout) but as far as i heard setSoTimeout is applicable both for both connection and read time out. I just want for connection time out but not for read time out. In detail, i just want time out if hand shake didnt happen in 10sec. Once hand shake happened, no time out must happen until i get response
Can any one please help me