Comments (4)
I also read this:
http://stackoverflow.com/questions/10243149/why-is-typedef-struct-foo-foo-considered-harmful
where there are pros and cons described both ways.
from paho.mqtt.c.
I've done some reading around this as well and fwiw my view is that if it's a public struct then I would avoid using a typedef but for opaque structs it makes sense.
Having said that, I'm also a big fan of not breaking backwards compatibility unless really necessary.
from paho.mqtt.c.
If you use C++, you don't have to use the struct keyword. I know that this isn't C++, but I was trying to get to a similar position, which would still probably be my preference. I don't want to break backward compatibility - we'd have to go to a 2.0 release for that.
We could have a #define which omitted the typedefs, for those who really want to. The default would be to operate as we do today.
from paho.mqtt.c.
I'll consider this for future client implementations, or new versions, but not for now. Thanks.
from paho.mqtt.c.
Related Issues (20)
- Occasional Crash in Main Program Calling paho.mqtt.c Library HOT 2
- Trace Output showing version 1.3.9 when 1.3.13 is installed HOT 3
- I can not build static libraries HOT 1
- MQTT Paho C/C++ returns disconnection after 2.5xKeepAlive HOT 2
- MQTTAsync_disconnect could return with success while disconnect command dropped
- Issue with accepting eclipse-paho-mqtt-c in cmake HOT 1
- double free or corruption (!prev) HOT 1
- possible race condition between MQTTClient_destroy and MQTTClient_run HOT 3
- IpV6 link local addresses resolve but don't connect HOT 2
- In MQTTClient, how to set it automatic reconnect after the connection lost HOT 1
- How to switch to another network card when the current network card can not connect to the broker with paho mqtt library HOT 3
- Error from MQTTAsync_cycle() when using SSL connection HOT 4
- Considering NO_PROXY environment variable on Proxy Settings HOT 1
- Cannot shutdown paho gracefully if connection lost to the broker and there are still messages to publish
- Duplicate QoS 0 messages received HOT 2
- QoS and retain both set to 1 then MQTT Client goes to MQTT Close session after time greater than keep alive interval and then reconnection
- code format quality HOT 1
- when using an address without :// mqttclient_create does not cause an error HOT 5
- Compile Issue with OS Defines in VS Code HOT 4
- Cannot connect to MQTT server with SSL on arm-linux
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.c.