User manual

15
This task uses a UDP server socket that listens by default on port 32323 to implement a simple
relay server. Any message that is received on that UDP port will be relayed back to the
originating socket. The following table lists and describes the available commands.
Command Description
uopen_s1 Opens the listening UDP server socket.
uclose_s1 Closes the socket and stops the communication.
ustnet_s1 Selects the strict network option for the UDP socket (incoming connections from any
network are allowed or only from the network that initiated the first connection).
ustport_s1 Selects the strict port option for the UDP socket (incoming connections from any host
port are allowed or only from the port that was used when the connection was first initiated).
ustadd_s1 Selects the strict address option for the UDP socket (incoming connections from any
host address are allowed or only from the address that was used when the connection was first
initiated).
udisplay_s1 Enables displaying of the received messages locally to the system console.
ustat_s1 Displays/clears the current TX and RX statistics for the current connection.
utxsize_s1 Sets the TX buffer size of the server socket. The larger the buffer the more memory is
used by the socket and the more efficient is the transfer. Default value is 1024 bytes. Note that
this value should not be made larger than 1460 for an Ethernet network (to avoid packets larger
than the link MTU).
app4.c::UDP client
This task uses a UDP client socket to connect to a remote server that listens by default on port
32324. Any message that is received by the socket can be optionally displayed locally. The client
has the possibility of sending messages to the server. The following table lists and describes the
available commands.
Command Description
uopen_c1 Opens the UDP client socket.
umsg_c1 Sends a message to the remote server.
uclose_c Closes the socket and stops the communication.
usrv4_c1 Sets the server IPv4 address and port. The default values are 192.168.100.101 and
32324.
uasync_c1 Enables the continuous transmission of messages to the server.
udisplay_c1 Enables displaying of the received messages locally to the system console.
ustat_c1 Displays/clears the current TX and RX statistics for the current connection.