Modulehosc-0.21.1Haskell2010
Sound.Osc.Transport.Fd.Udp
Osc over Udp implementation.
Synopsis
- newtype Udp
- value udpPort
- value udp_send_data
- value udp_sendAll_data
- value udp_send_packet
- value udp_recv_packet
- value udp_recv_packet_or
- value udp_close
- value with_udp
- value udp_socket
- value set_udp_opt
- value get_udp_opt
- value openUdp
- value udpServer
- value udp_server
- value sendTo
- value recvFrom
- Packagehosc-0.21.1
- Exports17
- 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.Concurrentlet 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.