public openSocket(host as String, port as Int) as SSLSocket throws SSLException:
Opens a TLS socket using this context.
| Parameter | Description |
|---|---|
host | Remote host. |
port | Remote port. |
Connected TLS socket.
import klyn.net.ssl
socket = SSLContext.clientDefault().openSocket("example.com", 443)
print(socket.isConnected)