data$, ip$, port = ReceiveUDPData(id[, size])
id
. This UDP object must have been created using CreateUDPObject()
earlier. The optional argument size
can be used to specify the maximum
number of bytes to receive. By default, this is set to 8192 bytes which
is also the maximum number of bytes ReceiveUDPData()
can handle. So you
may set size
to values less than 8192 bytes but not to more.
ReceiveUDPData()
returns three values: The first return value is a
string containing the data received from the UDP object. The second
return value contains the IP address of the sender, and the third return
value contains the port number of the sender.
Note that the global network timeout set using SetNetworkTimeout()
is currently ignored by ReceiveUDPData()
.