public SSLSocket(host as String, port as Int, context as SSLContext = null) throws SSLException:
Creates and connects a TLS socket.
| Parameter | Description |
|---|---|
host | Remote host. |
port | Remote port. |
context | TLS context. Defaults to SSLContext.clientDefault(). |
import klyn.net.ssl
socket = SSLSocket("example.com", 443)
print(socket.isConnected)
socket.close()