TCPIP_UDP_Get Function

C

uint16_t TCPIP_UDP_Get(UDP_SOCKET hUDP, uint8_t * v); 

Description

This function reads a single byte from the UDP socket, while decrementing the remaining RX buffer length. TCPIP_UDP_GetIsReady should be used before calling this function to get the number of bytes available in the socket.

Remarks

This function is very inefficient and its usage is discouraged. A buffered approach (TCPIP_UDP_ArrayGet) is preferred. See the previous notes for TCPIP_UDP_ArrayGet function.

Preconditions

UDP socket should have been opened with TCPIP_UDP_ServerOpen/TCPIP_UDP_ClientOpen. hUDP - valid socket

Parameters

ParametersDescription
hUDPsocket handle
vThe buffer to receive the data being read.