Companion

Functions

Link copied to clipboard
@JvmStatic
@JvmName(name = "get")
fun ByteArray.toIPAddress(): IPAddress

Converts network ordered bytes to an IPv4 or IPv6 address.

@JvmStatic
@JvmName(name = "get")
fun String.toIPAddress(): IPAddress

Parses a String for its IPv4 or IPv6 address.

Link copied to clipboard
@JvmStatic
@JvmName(name = "getOrNull")
fun ByteArray.toIPAddressOrNull(): IPAddress?

Converts network ordered bytes to an IPv4 or IPv6 address.

@JvmStatic
@JvmName(name = "getOrNull")
fun String.toIPAddressOrNull(): IPAddress?

Parses a String for its IPv4 or IPv6 address.