In the Haskell network package
bindSocket uses HostAddress and HostAddress6
which are defined as:
-- | Network byte order.
type HostAddress = Word32
-- | Host byte order.
type HostAddress6 = (Word32, Word32, Word32, Word32)
- How can I go from
123.123.123.123to aWord32? - How can I go from an
IPv6string to(Word32, Word32, Word32, Word32)? - Does endianness play a role on different OSes (Windows, Linux, OS X, FreeBSD)?
Use
getAddrInfo: