Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] MQTT-SN and MQTT embedded C client updates

I'm happy to use size_t if that's the consensus.


On 08/02/2014 08:05 PM, Roger Light wrote:
Hi Ian,

Packet ids have been changed to "unsigned short", and data buffers to
"unsigned char".  Now the data types are also consistent between the MQTT
and MQTT-SN libraries, which was another motivation.

I'm not expecting any further data type changes unless a good reason
appears.  I started using size_t for buffer sizes, but have stuck with ints
to reduce dependencies on any headers - just in case some esoteric/old
embedded compiler didn't like size_t.
I'm inclined to agree with Frank - do it "properly" (use size_t) and
then fix the odd case where size_t isn't defined if it crops up.

I'm also of the opinion that "void *" is a better data type for the
data buffers - less hassle for the end developer - but that's probably
less important.


paho-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Ian Craggs
icraggs@xxxxxxxxxx                 IBM United Kingdom
Committer on Paho, Mosquitto

Back to the top