NetworkAddress

expect abstract class NetworkAddress

Represents remote endpoint with hostname and port.

The address will be resolved after construction.

actual abstract class NetworkAddress

Represents remote endpoint with hostname and port.

The address will be resolved after construction.

actual typealias NetworkAddress = SocketAddress
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.

if the hostname cannot be resolved.

if the hostname cannot be resolved.

Constructors

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

Functions

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

Resolve current socket address.

Properties

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

Extensions

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

Network address hostname. This may trigger a reverse lookup.

Network address hostname.

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