Sending UDP Data (zero copy interface)
TCP/IP stack API function is used to send data to a UDP socket.
Data can only be sent after the
socket has been
created, configured, and
optionally bound to a local port number.
Part of the FreeRTOS+TCP Networking Tutorial
As detailed on the FreeRTOS_sendto() API reference page, FreeRTOS_sendto() can be used with standard calling semantics, or zero copy calling semantics. This page demonstrates the zero copy calling semantics.
The source code below shows a RTOS task that creates a UDP socket before entering a loop that sends a string to the socket (using the standard calling semantics) every 1 second (1000ms). The comments in the source code example provide important information on how to use network buffers when the zero copy interface is used.