socket-0.5.3.0: A portable and extensible sockets library.

Safe HaskellNone
LanguageHaskell2010

System.Socket.Family.Inet

Contents

Synopsis

Documentation

Addresses

data Address 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 getAddressInfo for parsing and suppress nameserver lookups:

> getAddressInfo (Just "127.0.0.1") Nothing aiNumericHost :: IO [AddressInfo Inet Stream TCP]
[AddressInfo {addressInfoFlags = AddressInfoFlags 4, socketAddress = SocketAddressInet { address = 127.0.0.1, port = 0}, canonicalName = Nothing}]

newtype Port Source

Constructors

Port Word16 

Instances

Special Address Constants

allHostsGroup

any

any :: Address Source

0.0.0.0

broadcast

broadcast :: Address Source

255.255.255.255

loopback

loopback :: Address Source

127.0.0.1

maxLocalGroup

none

none :: Address Source

255.255.255.255

unspecificGroup

Socket Options