Comments (7)
That seems reasonable one way or the other - make the options classes overridable or finish the full coverage of the C struct with getters/setters.
I was planning on adding full coverage of the underlying C struct for the 1.0 release of the library within the next few weeks, although I have yet to look at the automatic-reconnect capability of the C library and the implications it might have,
But I hadn't thought of making the options classes overridable. Other than making the data members protected, I suppose the classes would need virtual destructors.
Just out of curiosity, what are you trying to accomplish by overriding the connect_options class?
from paho.mqtt.cpp.
I just want to enable ssl options and automatic reconnect feature. That is why I need to get access to the underlying C struct. Actually I have just made opts_ member protected and created derived class and that's it! Everything works fine. There is no need to have virtual destructor for connect_options class because it is a super simple wrapper for C struct and it is reasonable to leave it so. The only thing I am missing now is offline buffering options (MQTTAsync_createOptions). Are you planning to implement it for the 1.0 release? Consider to replace MQTTAsync_create calls with MQTTAsync_createWithOptions analog that accepts additional argument of MQTTAsync_createOptions type. I can create a pull request. Does it make sense? I am looking forward to the 1.0 release. It's the only really nice c++ mqtt client that I know for now.
from paho.mqtt.cpp.
The SSL options are already available. Have you been working with the latest 'develop' branch?
And, yes. The idea for the C++ v1.0 release is to have full coverage of all the features of the upcoming Paho C v1.2 library, which will be released at the same time.
from paho.mqtt.cpp.
I have been working with master branch but will have a look at the develop branch. Thanks.
from paho.mqtt.cpp.
OK. Sorry to flip-flop!
The latest (fairly stable) code was just pushed to 'master'. This builds against the released Paho C, v1.1.
The 'develop' branch will be changing rapidly over the next few weeks as we push to the C++ v1.0 release. This will build against the upcoming Paho C v1.2 (the current 'develop' branch of the C library).
So use the develop branch with caution.
from paho.mqtt.cpp.
I think I'm closing in on all of your requirements. Have a look at the latest code in the develop branch. The createWithOptions
is covered with some new client constructors, and the connect_options
covers the latest version of the underlying C connect structure. I'm sure I've missed something, but will give it a review or two before the release. But if you spot something, let me know.
from paho.mqtt.cpp.
It looks like everything is covered for now. Thanks.
from paho.mqtt.cpp.
Related Issues (20)
- CMake Error when PAHO_BUILD_SAMPLES=TRUE (Cannot find src/samples/async_consume_v5.cpp) HOT 1
- Why is this project under Eclipse v1.0 when paho.mqtt.c is under Eclipse v2.0? HOT 1
- Building paho.mqtt.cpp: cmake doesn't pick up my c++ compiler correctly. HOT 4
- Homebrew Installation HOT 1
- Automatic Reconnect Crashes MQTT when `client.reconnect()` is called HOT 7
- Connect failed, more to try HOT 1
- SSL_read() Segmentation fault
- Build with PAHO_WITH_MQTT_C is broken HOT 3
- broker(emqx) already support QUIC, and i Hope client also supports the Quic protocol HOT 1
- arm cross get error HOT 8
- Add getter for the connect_options object (connOpts_) in async_client HOT 1
- Operation not permitted on try_consume_message async HOT 1
- Base64TestOpenSSL giving problem and how to use only paho-mqtt3as libraray project in visual studio HOT 1
- Cross compilation of paho.mqtt.cpp HOT 9
- cmake issue in Docker container HOT 2
- error in install_paho_mqtt_c.sh in the installation process of the latest version of paho.mqtt.cpp HOT 1
- ThreadSanitizer: lock-order-inversion (potential deadlock) paho 1.2.0
- Linker-Error when compiling with v1.3.2 HOT 5
- connect_options_builder doesn't propagate always properties HOT 5
- Rustls C++ binding into the paho-mqtt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paho.mqtt.cpp.