Am 01.07.2021 um 22:28 schrieb Luciano Moretti:
> Hi:
> Looking at getting MQTT working and while Outgoing Publishes and
> Subscription Requests are working I have a question trying to resolve
> the Incoming Publishes. The MQTT client uses 2 callbacks to split the
> Incoming Publish: The mqtt_incoming_publish_cb_t() and
> the mqtt_incoming_data_cb_t(). Looking at the MQTT Client code a single
> MQTT_MSG_TYPE_PUBLISH packet comes into the mqtt_message_recieved()
> function and gets split between the two callbacks. Why is this split
> instead of sending the topic+data in one callback?

I cannot really answer this. It's just the way the author wrote the code...

> If we have multiple
> subscriptions is it guaranteed that we'll receive an incoming Topic
> callback, then the matching incoming data callback? I think this is the
> case as we're in a single-threaded RAW API context.

From my knowledge of the code, this is guaranteed, yes. Reading the
code, you cannot identify the topic from the 'arg' parameter, or can you?

Regards,
Simon

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to