SPNA248 March 2021 TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD
Table 1-2 lists lwIP Raw UDP APIs to be used in an application. Figure 1-2 shows the simplified flowchart of the UDP client-server communication using Raw APIs.
| Function Category | API | Description |
|---|---|---|
| UDP connection | udp_new | Create a new UDP PCB (Protocol Control Block). |
| udp_bind | Bind the PCB to local IP address and port. The IP address can be specified as IP_ADDR_ANY in order to bind the connection to all local IP addresses. | |
| udp_connect | Associate the PCB with the remote UDP peer address. | |
| Receiving UDP data | udp_recv | Set the callback function that will be called when new data arrives. |
| Sending UDP data | udp_send | Send UDP packet to the current remote host associated with the PCB. |
| udp_sendto | Send data to a specified address using UDP. | |
| Closing connection | udp_disconnect | Remove the remote end of PCB. |
| udp_remove | Remove and deallocate the PCB. |
Figure 1-2 UDP Client Server Communication
Using Raw API