Jump to main content

##

# TCPIP_UDP_TxOffsetSet Function

## C

    bool TCPIP_UDP_TxOffsetSet(UDP_SOCKET hUDP, uint16_t wOffset, bool relative);

## Returns

- true - if the offset was valid and the write pointer has been moved
- false - if the offset was not valid

## Description

This function allows the write location within the TX buffer to be specified. Future calls to TCPIP_UDP_Put, TCPIP_UDP_ArrayPut, TCPIP_UDP_StringPut, etc will write data from the indicated location.

## Preconditions

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

## Parameters

Parameters | Description
--- | ---
hUDP | UDP socket handle
wOffset | Offset in the UDP packet data payload to move the write pointer.
relative | if true, the wOffset is added to the current write pointer. else the wOffset is from the beginning of the UDP buffer