Endpoint(address: String, udpPort: Int = DEFAULT_PORT, tcpPort: Int? = null)
Create a new endpoint.
address
- the IP string literal
udpPort
- the UDP port for the endpoint
tcpPort
- the TCP port for the endpoint or null
if no TCP port is known
IllegalArgumentException
- if the address isn't an IP address, or either port is out of range
Endpoint(address: InetSocketAddress, tcpPort: Int? = null)
Create a new endpoint.
address
- an InetSocketAddress, containing the IP address the UDP port
Endpoint(address: InetAddress, udpPort: Int = DEFAULT_PORT, tcpPort: Int? = null)
Create a new endpoint.
udpPort
- the UDP port for the endpoint
tcpPort
- the TCP port for the endpoint or null
if no TCP port is known
IllegalArgumentException
- if either port is out of range
Constructor
Create a new endpoint.