FreeRTOS: Platform
Platform portability layer
Return to main page ↑

Block and wait for incoming network data.

size_t ( * receive )( void * pConnection,
uint8_t * pBuffer,
size_t bytesRequested );

Wait for a message of size bytesRequested to arrive on the network and place it in pBuffer.

Parameters
[in]pConnectionThe connection to wait on, defined by the network stack.
[out]pBufferWhere to place the incoming network data. This buffer must be at least bytesRequested in size.
[in]bytesRequestedHow many bytes to wait for. pBuffer must be at least this size.
Returns
The number of bytes successfully received. This should be bytesRequested when successful. Any other value may indicate an error.