|Re: [paho-dev] mqtt.embedded-c/MQTTPacket/ samples and src/MQTTPacket.c|
Sergio,it's fine to change MQTTPacket.c, although I'd prefer the interfaces to the functions, including MQTTPacket_read(), to remain the same so that any material (like the video demos by Benjamin) will still work.
I have been thinking that it would be better for MQTTPacket_read() to take a network object as a parameter. This would have to be a non-specific type (void*) to be network API agnostic. To do this now without changing the interface will mean creating another function.
I had been thinking of MQTTPacket_read also as a sample, or example of how one would write a packet reading function, but the more useful it is, the better. So please go ahead.
Thanks! Ian On 19/09/14 19:36, Sergio R. Caprile wrote:
The timeout approach should mostly work, but is not guaranteed on every possible situation where TCP will work. I mean, I can put a 10 second timeout and TCP can take 11 to deliver the data, and that will cause a sync loss and data loss. This is true for every platform. My intention is to modify MQTTPacket.c, it should support TCP as it is. Then, current samples will stay generic samples, even though they are socket specific, we can add more samples later; I will probably be adding samples for lwIP raw API. _______________________________________________ paho-dev mailing list paho-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/paho-dev
Back to the top