klyn.net.ssl.SSLSocket.SSLSocket
constructor

    public SSLSocket(socket as Socket,
    host as String,
    port as Int,
    context as SSLContext = null) throws SSLException:

Description

Wraps an already-connected TCP socket into TLS.

This constructor is suited for protocols that negotiate TLS after an initial clear-text handshake.

    import klyn.net
    import klyn.net.ssl

    # plain = Socket("example.com", 443)
    # secure = SSLSocket(plain, "example.com", 443)