socket-0.5.3.0: A portable and extensible sockets library.

Safe HaskellNone
LanguageHaskell2010

System.Socket.Family.Inet6

Contents

Synopsis

Documentation

Addresses

data SocketAddressInet6 Source

Example:

SocketAddressInet6 loopback 8080 mempty 0

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 "::1") Nothing aiNumericHost :: IO [AddressInfo SocketAddressInet6 Stream TCP]
[AddressInfo {
   addressInfoFlags = AddressInfoFlags 4, 
   socketAddress    = SocketAddressInet6 {address = 0000:0000:0000:0000:0000:0000:0000:0001, port = 0, flowInfo = mempty, scopeId = 0},
   canonicalName    = Nothing }]

newtype Port Source

Constructors

Port Word16 

Instances

newtype ScopeId Source

Constructors

ScopeId Word32 

Special Address Constants

any

loopback

Socket Options

V6Only