mirror of
https://github.com/FreeRTOS/coreMQTT
synced 2025-10-24 11:08:21 +08:00
Express the need of a non-blocking TransportRecv_t (#318)
Express the need of a non-blocking TransportRecv_t #317 Description ----------- - changed documentation to express the need of a non-blocking TransportRecv_t - mentioned that a non-blocking implementation is highly recommended in porting.dox and in the transportinterface - did go more into detail in TransportRecv_t what the effects of a blocking recv implementation are Test Steps ----------- only changed documentation Checklist: ---------- <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have tested my changes. No regression in existing tests. - [ ] I have modified and/or added unit-tests to cover the code changes in this Pull Request. Related Issue ----------- #317 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Paul Höhn <paulh@MacBook-Air-von-Paul.local> Co-authored-by: DakshitBabbar <100972343+DakshitBabbar@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: DakshitBabbar <dakshitbabbar.iitd@gmail.com>
This commit is contained in:
@@ -55,6 +55,8 @@ struct NetworkContext {
|
|||||||
};
|
};
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
Please note that it is HIGHLY RECOMMENDED that the transport receive implementation does NOT block.
|
||||||
|
|
||||||
@section mqtt_porting_time Time Function
|
@section mqtt_porting_time Time Function
|
||||||
@brief The MQTT library relies on a function to generate millisecond timestamps, for the
|
@brief The MQTT library relies on a function to generate millisecond timestamps, for the
|
||||||
purpose of calculating durations and timeouts, as well as maintaining the keep-alive mechanism
|
purpose of calculating durations and timeouts, as well as maintaining the keep-alive mechanism
|
||||||
|
|||||||
@@ -96,6 +96,7 @@
|
|||||||
* without TLS, it is typically implemented by calling the TCP layer receive
|
* without TLS, it is typically implemented by calling the TCP layer receive
|
||||||
* function. @ref TransportRecv_t may be invoked multiple times by the protocol
|
* function. @ref TransportRecv_t may be invoked multiple times by the protocol
|
||||||
* library, if fewer bytes than were requested to receive are returned.
|
* library, if fewer bytes than were requested to receive are returned.
|
||||||
|
* Please note that it is HIGHLY RECOMMENDED that the transport receive implementation does NOT block.
|
||||||
* <br><br>
|
* <br><br>
|
||||||
* <b>Example code:</b>
|
* <b>Example code:</b>
|
||||||
* @code{c}
|
* @code{c}
|
||||||
@@ -200,6 +201,9 @@ typedef struct NetworkContext NetworkContext_t;
|
|||||||
* coreMQTT will continue to call the transport interface if it receives
|
* coreMQTT will continue to call the transport interface if it receives
|
||||||
* a partial packet until it accumulates enough data to get the complete
|
* a partial packet until it accumulates enough data to get the complete
|
||||||
* MQTT packet.
|
* MQTT packet.
|
||||||
|
* A non‐blocking implementation is also essential so that the library's inbuilt
|
||||||
|
* keep‐alive mechanism can work properly, given the user chooses to use
|
||||||
|
* that over their own keep alive mechanism.
|
||||||
*
|
*
|
||||||
* @param[in] pNetworkContext Implementation-defined network context.
|
* @param[in] pNetworkContext Implementation-defined network context.
|
||||||
* @param[in] pBuffer Buffer to receive the data into.
|
* @param[in] pBuffer Buffer to receive the data into.
|
||||||
|
|||||||
Reference in New Issue
Block a user