TCPIP_UDP_PutIsReady Function

C

uint16_t TCPIP_UDP_PutIsReady(UDP_SOCKET hUDP); 

Returns

The number of bytes that can be written to this socket.

Description

This function determines how many bytes can be written to the specified UDP socket. This function performs TX buffer allocation for the socket.

Remarks

If the current socket TX buffer is in use (in traffic), this function will allocate a new TX buffer. Otherwise the current TX buffer will be used. The function SHOULD be called before using TCPIP_UDP_ArrayPut for the first time or after any TCPIP_UDP_Flush. There is no harm in calling it everytime before any TCPIP_UDP_ArrayPut (except the overhead).

Preconditions

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

Parameters

ParametersDescription
hUDPUDP socket handle