Skip to content

Express the need of a non-blocking TransportRecv_t#318

Merged
rohitmadan07 merged 5 commits intoFreeRTOS:mainfrom
jadaber:main
Apr 7, 2025
Merged

Express the need of a non-blocking TransportRecv_t#318
rohitmadan07 merged 5 commits intoFreeRTOS:mainfrom
jadaber:main

Conversation

@jadaber
Copy link
Contributor

@jadaber jadaber commented Apr 4, 2025

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:

  • 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.

Copy link
Member

@DakshitBabbar DakshitBabbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @diopoex,
Thanks for this PR, looks good to me. I've added a small suggestion, let me know your thoughts.

* mechanism can work properly.
* coreMQTT will continue to call the transport interface if it receives
* a partial packet until it accumulates enough data to get the complete
* MQTT packet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if it would be better to include the fact that the user can also implement their own keep alive mechanism in which case the non-blocking receive function may/may not affect the keep alive mechanism. Something like this:

/*
 * @note It is HIGHLY RECOMMENDED that the transport receive
 * implementation does NOT block.
 * coreMQTT will continue to call the transport interface if it receives
 * a partial packet until it accumulates enough data to get the complete
 * 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.
 */

Let me know what you think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's perfect I think!

Co-authored-by: DakshitBabbar <100972343+DakshitBabbar@users.noreply.github.com>
@rohitmadan07
Copy link
Member

/bot run formatting

@rohitmadan07 rohitmadan07 merged commit c5715e3 into FreeRTOS:main Apr 7, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants