@hackage HostAndPort0.1.0

Parser host and port pairs like localhost:22

Simple parser for parsing host and port pairs. Host can be either ipv4, ipv6 or domain name and port are optional.

IPv6 address should be surrounded by square brackets.

Examples:

  • localhost

  • localhost:8080

  • 127.0.0.1

  • 127.0.0.1:8080

  • [::1]

  • [::1]:8080