Skip to content

Commit

Permalink
Correct TransportRecv_t documentation
Browse files Browse the repository at this point in the history
Corrections highlight the non-blocking
expectations of the TransportRecv method.

Inspired by - FreeRTOS#261
  • Loading branch information
kstribrnAmzn committed Feb 8, 2024
1 parent b9dfc36 commit 033a118
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions source/interface/transport_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,10 @@ typedef struct NetworkContext NetworkContext_t;
* @transportcallback
* @brief Transport interface for receiving data on the network.
*
* @note It is RECOMMENDED that the transport receive implementation
* does NOT block when requested to read a single byte. A single byte
* read request can be made by the caller to check whether there is a
* new frame available on the network for reading.
* However, the receive implementation MAY block for a timeout period when
* it is requested to read more than 1 byte. This is because once the caller
* is aware that a new frame is available to read on the network, then
* the likelihood of reading more than one byte over the network becomes high.
* @note It is HIGHLY RECOMMENDED that the transport receive
* implementation does NOT block when requested to read bytes.
* CoreMQTT will continue to request bytes from the transport
* interface until it has received all bytes necessary for a MQTT packet.
*
* @param[in] pNetworkContext Implementation-defined network context.
* @param[in] pBuffer Buffer to receive the data into.
Expand Down

0 comments on commit 033a118

Please sign in to comment.