-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of a reconnect client #785
Conversation
Codecov Report
@@ Coverage Diff @@
## master #785 +/- ##
=======================================
Coverage 85.03% 85.03%
=======================================
Files 64 64
Lines 8932 8932
=======================================
Hits 7595 7595
Misses 1337 1337 |
With wandbox.org, would it be possible to import a library. |
I do not fully agree with your comment every example should only show one aspect, please consider my thoughs here: I think the reason users are using this library is to setup a client connection with an mqtt broker. There are now many examples: no encryption, tls, ws, sync/async and server. I would say the user is more helped with a single example showing a pattern how to use the library to setup a MQTT client connection. I think actually one example would suffice, if this would show how to setup a connection, subscribe, reconnect and publish, this would be sufficient. And this example could do all possible connection: tls/raw TCP, ws. I also do not understand why two approaches to the client: sync and async. Like you said, the mqtt protocol requires the callbacks because of the nature of the protocol. The sync/async is only for the connecting, correct ? I hope you consider this feedback, i am just thinking out loud what would be a good example of the library. |
You can write a PR to https://github.com/melpon/wandbox-builder. For example, boost(experimental) sml is added as follows: I think that not only here but also other setting might be required to adding a new library. |
I don't have a plan to remove examples. It is documented on the README.md.
No. All sending API has sync version and async version.
I'm an advanced user. I use async sending APIs for performance critical case. e.g. my proprietary broker. On the contrary, sync sending API is very simple. User doesn't need to care the lifetime except QoS1 and 2 publish. Anyway, I will merge the PR. |
No description provided.