klyn.net.InetSocketAddress.InetSocketAddress
constructor
public InetSocketAddress(host as String, port as Int):
Description

Creates an internet socket address from host and port.

Parameters
ParameterDescription
hostHost name or textual address. An empty value binds to all interfaces.
portPort in the inclusive range 0..65535.
Throws
  • ValueException when port is outside the valid TCP/UDP range.
Example
import klyn.net

endpoint = InetSocketAddress("localhost", 8080)
assert endpoint.port == 8080