socket-0.3.0.1: A portable and extensible sockets library.

Safe HaskellNone
LanguageHaskell2010

System.Socket.Family.INET

Synopsis

Documentation

data AddrIn Source

To avoid errors with endianess it was decided to keep this type abstract.

Hint: Use the Storable instance if you really need to access. It exposes it exactly as found within an IP packet (big endian if you insist on interpreting it as a number).

Another hint: Use getAddrInfo for parsing and suppress nameserver lookups:

> getAddrInfo (Just "127.0.0.1") Nothing aiNUMERICHOST :: IO [AddrInfo SockAddrIn STREAM TCP]
[AddrInfo {addrInfoFlags = AddrInfoFlags 4, addrAddress = "127.0.0.1:0", addrCanonName = Nothing}]

inaddrBROADCAST :: AddrIn Source

255.255.255.0

inaddrNONE :: AddrIn Source

255.255.255.0