splitIpPort

fun splitIpPort(s: String, defaultPort: Int): IpPort

split a (IP or FQDN):port formatted string (e.g 192.168.100.10:54 or www.example.com:54) into a string IP address (or FQDN) and an integer port

Parameters

s

The IP address or FQDN

defaultPort

The port number to use if a port (i.e. a colon) is not part of the string

Throws

if the input string is bad