klyn.net.Socket.Socket
constructor
public Socket(host as String, port as Int) throws IOException
Description

Connects to the specified endpoint; an invalid endpoint is never treated as a request for an unconnected socket.

Parameters
ParameterDescription
hostRequired remote hostname. @param port Remote TCP port.
Throws
  • IOException if the socket stream is closed, disconnected, times out, or the underlying network I/O fails.
Example

socket = Socket("example.com", 80)