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

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.



Back to the top