NetworkHostAndPort - corda

corda / net.corda.core.utilities / NetworkHostAndPort

# NetworkHostAndPort

`data class NetworkHostAndPort`

Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data.

### Parameters

`host` - a hostname or IP address. IPv6 addresses must not be enclosed in square brackets.

`port` - a valid port number.

### Constructors

#### <init> | Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data. `NetworkHostAndPort(host: String, port: Int)`

### Properties

#### host | a hostname or IP address. IPv6 addresses must not be enclosed in square brackets. `val host: String`
#### port | a valid port number. `val port: Int`

### Functions

#### toString | `fun toString(): String`

### Companion Object Functions

#### parse | Parses a string of the form host:port into a NetworkHostAndPort. The host part may be a hostname or IP address. If it's an IPv6 address, it must be enclosed in square brackets. Note this does not parse the toString of a resolved java.net.InetSocketAddress, which is of a host/IP:port form. `fun parse(str: String): NetworkHostAndPort`