network-house-0.1.0.0: data and parsers for Ethernet, TCP, UDP, IPv4, IPv6, ICMP, DHCP, TFTP

Safe HaskellSafe-Inferred

Net.UDP_Client

Documentation

initialize :: (Eq (r ()), RefIO r m, MVarIO v m, ChannelIO c m, DelayIO m, ForkIO m) => ([Char] -> m ()) -> Addr -> Interface m (Packet (Packet InPacket)) (Packet (Packet OutPacket)) -> m (Interface m)Source

data Interface m Source

Constructors

Interface 

Fields

listen :: Port -> m (UDP_API m)
 
listenAny :: m (Port, UDP_API m)
 
unlisten :: Port -> m ()
 

data Packet content Source

Constructors

Packet 

Fields

sourcePort :: !Port
 
destPort :: !Port
 
len :: !Word16
 
checksum :: !Word16
 
content :: !content
 

Instances

Functor Packet 
Container Packet 
Show content => Show (Packet content) 
Unparse a => Unparse (Packet a) 
Parse a => Parse (Packet a) 

template :: Port -> Port -> content -> Packet contentSource

newtype Port Source

Constructors

Port Word16