udp-conduit-0.1.0.4: Simple fire-and-forget conduit UDP wrappers

Safe HaskellNone
LanguageHaskell2010

Conduit.UDP

Synopsis

Documentation

udpSink Source #

Arguments

:: (MonadResource m, IOData a) 
=> String

address to destination

-> PortNumber

port number on destination

-> ConduitM a o m ()

Can be viewed as a Sink ByteString

Fire-and-forget style UDP sink. It will attempt to connect to the specified destination, and if it succeeds it will start hurdling data from upstream toward the destination. Must be used with runConduitRes, since it uses a finite resource (sockets)

udpSource Source #

Arguments

:: (MonadResource m, IOData a, MonoFoldable a) 
=> String

address to bind to

-> PortNumber

port number to bind to

-> ConduitM i a m ()

Can be viewed as a MonadIO m => Source m ByteString

Fire-and-forget style UDP source. It will attempt to listen on the specified interface and port, and if it succeeds it can read contents being sent to that interface and port. Must be used with runConduitRes, since it uses a finite resource (sockets)