Name
ReceiveUDPData -- receive data through UDP protocol (V5.0)
Synopsis
data$, ip$, port = ReceiveUDPData(id[, size])
Function
This function can be used to receive data from the UDP object specified by 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().

Inputs
id
identifier of the UDP object to use
size
optional: maximum number of bytes to receive (defaults to 8192 bytes)
Results
data$
the data that was read from the network
ip$
IP address of the data sender
port
port number of the data sender

Show TOC