InetAddress myAddress) throws IOException {
SSLSocket sock = (SSLSocket) sslSocketFactory.createSocket();
if (myAddress != null) {
// trying to bind to the correct ipaddress (in case of multiple vip addresses by example)
// and let the JDK pick an ephemeral port
sock.bind(new InetSocketAddress(myAddress, 0));
}
try {
sock.connect(new InetSocketAddress(address, port), 8000);
} catch (SocketTimeoutException e) {
throw new ConnectException("Socket timeout error (8sec)" + address + ":" + port);