Closed TridentTD closed 6 years ago
When you receive the callback from a remote subscription (via the original client lib) you get a pointer to a MQTTclient struct, when you get it from the local broker it is set to NULL.
In some cases it could be the publishing MQTT_ClientCon, but e.g. for retained messages this doesn't work. Also it is not the intention of MQTT and the pubsub model to provide local extra info on the sender of a publication to a subscriber
Thank you .. because of retained messages, it is set to NULL.....
If for normal messages , can I get a pointer to MQTT_ClientCon struct, and for retained messages, get a pointer to NULL instead?
Sorry, no - it COULD be done - in fact, you get NULL all the time...
Thanks.
How to use this "args" in MQTT Broker's DataCallback? Is it MQTT_ClientCon type?