HostAndPort

Parser for host and port pairs like localhost:22

https://github.com/bacher09/hostandport

Latest on Hackage:0.2.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Slava Bacherikov
Maintained by [email protected]

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