tuweni / org.apache.tuweni.devp2p / Endpoint / <init>

<init>

Endpoint(address: String, udpPort: Int = DEFAULT_PORT, tcpPort: Int? = null)

Create a new endpoint.

Parameters

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

Exceptions

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.

Parameters

address - an InetSocketAddress, containing the IP address the UDP port

Endpoint(address: InetAddress, udpPort: Int = DEFAULT_PORT, tcpPort: Int? = null)

Create a new endpoint.

Parameters

address - the InetAddress

udpPort - the UDP port for the endpoint

tcpPort - the TCP port for the endpoint or null if no TCP port is known

Exceptions

IllegalArgumentException - if either port is out of range

Constructor
Create a new endpoint.