klyn.net.ssl.SSLContext.openSocket
method
public openSocket(host as String, port as Int) as SSLSocket throws SSLException:
Description

Opens a TLS socket using this context.

Parameters
  • host Remote host.
  • port Remote port.
Returns

Connected TLS socket. klyn import klyn.net.ssl socket = SSLContext.clientDefault().openSocket("example.com", 443) print(socket.isConnected)

Throws
  • SSLException if TLS options, certificates, trust paths, or socket creation are invalid.