[ ]
 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS Labs FreeRTOS+TCP FreeRTOS+FAT Contact / Enquiries


FreeRTOS+TCP is still in the lab
FreeRTOS+TCP is already used in commercial products and we encourage you to try it yourself. Be aware however that we are still refining its design, and the source code and documentation do not yet meet Real Time Engineers Ltd's strict quality standards.
Please use the forum for support, feedback and ideas, or contact us directly if you have a specific business interest.

FreeRTOS_GetUDPPayloadBuffer()

[FreeRTOS+TCP API Reference]

FreeRTOS_sockets.h
void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );
		

Obtains a buffer from the TCP/IP stack for use with the zero copy interface.

The zero copy interface for transmitting data is described on the FreeRTOS_sendto() documentation page.

Parameters:

xRequestedSizeBytes   The size of the buffer being requested. The size is specified in bytes.

xBlockTimeTicks   The maximum time the calling RTOS task is prepared to wait for a buffer if one is not immediately available.

If a buffer is not available then the calling RTOS task will be held in the Blocked state (so other tasks can execute) until either a buffer becomes available or the block time expires.

The block time is specified in ticks. Milliseconds can be converted to ticks by dividing the time in milliseconds by portTICK_PERIOD_MS.

To prevent deadlocks the maximum block time is capped to ipconfigMAX_SEND_BLOCK_TIME_TICKS. ipconfigMAX_SEND_BLOCK_TIME_TICKS is defined in FreeRTOSIPConfig.h

Returns:

If a buffer was obtained then a pointer to the obtained buffer is returned.

If a buffer could not be obtained then NULL is returned.

Example usage:

The FreeRTOS_sendto() documentation page contains an example zero copy send operation that includes a call to FreeRTOS_GetUDPPayloadBuffer().


[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS Labs Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.