title: Create SSLSocket by SSLSocketFactory with set connection timeout
body: <p>My code is here:</p>
  
  <pre><code>SSLContext sslContext = SSLContext.getInstance("TLS");
  sslContext.init(null, getAllCerts(), new SecureRandom());
  SSLSocketFactory factory = sslContext.getSocketFactory();
  mSocket = (SSLSocket) factory.createSocket("myhost.com", socketPort[index]);
  </code></pre>
  
  <p>I have to check table of ports and choose the open one. Everything works ok, but on createSocket() my application loose a lot of time. If I have 5 ports and the last is open connecting takes about 3 minutes.</p>
  
  <p>How can I set timeout on SSLSocketFactory to speed up connection?</p>