TCPIP_UDP_Flush Function
C
uint16_t TCPIP_UDP_Flush(UDP_SOCKET hUDP);
Returns
The number of bytes that currently were in the socket TX buffer and have been flushed. Otherwise, 0 if the packet could not be transmitted:
invalid socket
invalid remote address
no route to the remote host could be found
Description
This function builds a UDP packet with the pending TX data and marks it for transmission over the network interface. There is no UDP state machine to send the socket data automatically. The UDP socket client must call this function to actually send the data over the network.
Remarks
Note that a UDP socket must be flushed to send data over the network. There is no UDP state machine (auto transmit) for UDP sockets.
Preconditions
UDP socket should have been opened with TCPIP_UDP_ServerOpen/TCPIP_UDP_ClientOpen. hUDP - valid socket
Parameters
Parameters | Description |
---|---|
hUDP | UDP socket handle |