TCPIP_UDP_StringPut Function

C

const uint8_t* TCPIP_UDP_StringPut(UDP_SOCKET hUDP, const uint8_t * strData); 

Returns

A pointer to the byte following the last byte written. Note that this is different than the TCPIP_UDP_ArrayPut functions. If this pointer does not dereference to a NULL byte, then the buffer became full and the input data was truncated.

Description

This function writes a null-terminated string to the UDP socket while incrementing the socket write pointer. TCPIP_UDP_PutIsReady could be used before calling this function to verify that there is room in the socket buffer.

Preconditions

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

Parameters

ParametersDescription
hUDPUDP socket handle
strDataPointer to the string to be written to the socket.