NET_PRES_SocketReadIsReady Function

C

uint16_t NET_PRES_SocketReadIsReady(NET_PRES_SKT_HANDLE_T handle); 

Returns

The number of bytes available to be read from the TCP RX buffer.

Description

Call this function to determine how many bytes can be read from the RX buffer. If this function returns zero, the application must return to the main stack loop before continuing in order to wait for more data to arrive. This function calls the transport layer's ReadIsReady function. When using an encrypted connection the number of unencrypted bytes may turn out to be different than what this function returns.

Preconditions

A socket needs to have been opened by NET_PRES_SocketOpen.

Parameters

ParametersDescription
handleThe presentation layer socket handle.