Modulehosc-0.20Haskell2010
Sound.Osc.Transport.Fd.Udp
Osc over Udp implementation.
- 1 type
- 15 values
- Packagehosc-0.20
- Exports16
- LanguageHaskell2010
- LicenceGPL-3.0-only
- SourceUdp.hs
Return the port number associated with the Udp socket.
Send data over Udp using send.
Send data over Udp using sendAll.
Send packet over Udp.
Receive packet over Udp.
Close Udp.
Bracket Udp communication.
Create and initialise Udp socket.
Set option, ie. Broadcast or RecvTimeOut.
Get option.
Make a Udp connection.
Trivial Udp server socket.
import Control.Concurrent {- base -}let u0 = udpServer "127.0.0.1" 57300
t0 <- forkIO (Fd.withTransport u0 (\fd -> forever (Fd.recvMessage fd >>= print >> print "Received message, continuing")))
killThread t0let u1 = openUdp "127.0.0.1" 57300
Fd.withTransport u1 (\fd -> Fd.sendMessage fd (Packet.message "/n" []))Variant of udpServer that doesn't require the host address.
Send to specified address using 'C.sendAllTo.
Recv variant to collect message source address.