hostPortOf

fun hostPortOf(address: String?): HostPort

Parses a host:port? String into HostPort.

  • Empty input → HostPort(null, null)

  • Invalid ports → null