TCPIP_UDP_GetIsReady Function

C

uint16_t TCPIP_UDP_GetIsReady(UDP_SOCKET hUDP); 

Returns

The number of bytes that can be read from this socket.

Description

This function will return the number of bytes that are available in the specified UDP socket RX buffer.

Remarks

The UDP socket queues incoming RX packets in an internal queue. If currently there is no RX packet processed (as a result of retrieving all available bytes with TCPIP_UDP_ArrayGet, for example), this call will advance the RX packet to be processed to the next queued packet. If a RX packet is currently processed, the call will return the number of bytes left to be read from this packet.

Preconditions

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

Parameters

ParametersDescription
hUDPUDP socket handle