UDP Services

FUNCTION UDPIN (
PORT ) AS STRING
FUNCTION LASTIP
SUB UDPOUT ( IP, PORT, String )
UDPIN and UDPOUT read or write a packet of data on the network using UDP
protocol.
The IP address which the data is sent to or received from is
designated by IPa.IPb.IPc.IPd eg. 192.168.0.122, which is packed into
a 32 bit word.
Broadcast addressing
is not supported for UDPIN or UDPOUT.
The port is designated by
PORT.
NODE PING - A special feature of ARMweb listens on port
49152 (0xC000) for any UDP broadcast.
The node will then reply with its Name
and IP to identify it on the network.
According to iana.org, The Dynamic
and/or Private Ports are those from 49152 through 65535.
User applications
should use ports above 49152 to avoid other conflicts.
UDPOUT
automatically sets the node to listen on the given port.
This allows any
reponses to be buffered and subsequently read with UDPIN.
If an application
wishes to just read UDPIN it is advised to call UDPIN once to clear any buffered
data first.
Each call to UDPIN will wait up to one half second to receive
data or return immediately upon receipt.
If no data was read the port is left
open for reading, any incoming data will be buffered and available for
subsequent calls.
The maximum size of the returned by UDPIN is 255 bytes.
This function requires version 7.36 of the firmware