NetworkAddress

expect abstract class NetworkAddress

Represents remote endpoint with hostname and port.

The address will be resolved after construction.

Throws

if the hostname cannot be resolved.

actual abstract class NetworkAddress

Represents remote endpoint with hostname and port.

The address will be resolved after construction.

Throws

if the hostname cannot be resolved.

actual typealias NetworkAddress = SocketAddress

Represents remote endpoint with hostname and port.

The address will be resolved after construction.

Throws

if the hostname cannot be resolved.

actual abstract class NetworkAddress(val hostname: String, val port: Int, explicitAddress: Any? = null)

Represents remote endpoint with hostname and port.

The address will be resolved after construction.

Throws

if the hostname cannot be resolved.

Constructors

Link copied to clipboard
constructor(hostname: String, port: Int, explicitAddress: Any? = null)

Properties

Link copied to clipboard

Network address. Usually, it's an IP address in string form. This will not trigger a reverse lookup.

Network address hostname.

Link copied to clipboard
var explicitAddress: AtomicRef<Any?>
Link copied to clipboard
Link copied to clipboard

Network address hostname. This may trigger a reverse lookup.

Network address hostname.

Link copied to clipboard
val port: Int
Link copied to clipboard
expect val NetworkAddress.port: Int

Network address port.

actual val NetworkAddress.port: Int

Network address port.

actual val NetworkAddress.port: Int

Functions

Link copied to clipboard
open override fun toString(): String

Resolve current socket address.