6.1-roDatagramReceiver
ON THIS PAGE
This object sends roDatagramEvent instances to a message port when UDP packets are received on a specified port.
Object Creation: The roDatagramReceiver object is created with a port
 parameter, which specifies the port on which to receive UDP packets.
CreateObject("roDatagramReceiver ", port As Integer)
ifIdentity
GetIdentity() As Integer
ifMessagePort
SetPort(port As roMessagePort)
Posts messages of type roDatagramEvent to the attached message port.
Â
This example script listens for UDP packets on port 21075:
receiver = CreateObject("roDatagramReceiver", 21075) mp = CreateObject("roMessagePort") receiver.SetPort(mp) while true event = mp.WaitMessage(0) if type(event) = "roDatagramEvent" then print "Datagram: "; event endif end while
Â
Â