/** * Creates a new unconnected SSL socket that will connect to the given host on * the given port. * * @param hostAddress Resolved remote host address * @param port Remote port * @param timeout Socket timeout * @param params Socket parameters including SSL properties */ public SnappyTSSLSocket(InetAddress hostAddress, int port, int timeout, SocketParameters params) throws TTransportException { super(initSSLSocket(hostAddress, port, params, timeout)); this.hostAddress = hostAddress; this.port = port; final Socket socket = getSocket(); setProperties(socket, timeout, params); if (!isOpen()) { this.open(); } this.socketToSameHost = ClientSharedUtils.isSocketToSameHost( socket.getLocalSocketAddress(), socket.getRemoteSocketAddress()); }