@Override
    public TlsCryptoSocket createClientCryptoSocket(SocketChannel channel, Spec spec)  {
        String peerHost = spec.host() != null ? spec.host() : "localhost"; // Use localhost for wildcard address
        SSLEngine sslEngine = tlsContext.createSslEngine(peerHost, spec.port());
        sslEngine.setUseClientMode(true);
        return new TlsCryptoSocket(channel, sslEngine);
    }
A {@link CryptoSocket} that creates {@link TlsCryptoSocket} instances.

@author bjorncs
jrt/src/com/yahoo/jrt/TlsCryptoEngine.java