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

Connects this TLS socket.

Parameters
ParameterDescription
hostRemote host.
portRemote port.
Throws
  • SSLException when the TLS connection fails.
Example
import klyn.net.ssl

socket = SSLSocket()
socket.connect("example.com", 443)
print(socket.isConnected)
socket.close()