MQTTASYNC_RESPONSEOPTIONS(3)

πŸ’– MQTTAsync_responseOptions πŸ’–

okay so bestie, welcome to the MQTTAsync_responseOptions page from the Library Functions Manual β€” it's giving struct-that-defines-your-call-options energy and honestly? iconic. sit down, grab a strawberry πŸ“, we're doing this together.


✨ SYNOPSIS ✨

#include <MQTTAsync.h>

πŸŽ€ Data Fields πŸŽ€

  • char struct_id [4]
  • int struct_version
  • MQTTAsync_onSuccess * onSuccess
  • MQTTAsync_onFailure * onFailure
  • void * context
  • MQTTAsync_token token
  • MQTTAsync_onSuccess5 * onSuccess5
  • MQTTAsync_onFailure5 * onFailure5
  • MQTTProperties properties
  • MQTTSubscribe_options subscribeOptions
  • int subscribeOptionsCount
  • MQTTSubscribe_options * subscribeOptionsList

🌸 Detailed Description 🌸

So this whole struct is literally just the structure that defines your call options, periodt. πŸ’…

But wait β€” for MQTT 5.0 there's input data going on and stuff describing the response method, so the glow-up happened and now there's also a synonym: MQTTAsync_callOptions, which lowkey reflects how you actually use it way better. πŸ¦‹

The responseOptions name? Yeah, it's still here. Kept for backward compatibility β€” we respect our elders in this house. 🫢


πŸ¦‹ Field Documentation πŸ¦‹

char struct_id[4]

The eyecatcher for this structure. Has to be MQTTR β€” no negotiating, bestie, it's the vibe check for the struct. πŸ‘‘

int struct_version

The version number of this structure. Must be 0 or 1. And if it's 0? Then there are no MQTTV5 options, that's just the deal. πŸ™ˆ

MQTTAsync_onSuccess* onSuccess

A pointer to a callback function that gets called if the API call successfully completes. You can set it to NULL β€” but then you get no indication of successful completion at all, so like... your call. 😭

MQTTAsync_onFailure* onFailure

A pointer to a callback function that gets called if the API call fails. Can also be NULL, in which case you get no indication of unsuccessful completion β€” and honestly, the silence is deafening. πŸ’€

void* context

A pointer to any application-specific context you want. This context pointer gets passed to your success or failure callback functions, so your callbacks can actually reach the context info. It's the little string tying it all together. πŸŽ€

MQTTAsync_token token

A token gets returned from the call, and you can use it to track the state of this request β€” both inside the callbacks and in future calls like MQTTAsync_waitForCompletion. This one is output only β€” any change made by the application will be ignored. Don't touch, bestie, it's not yours. 🚫

MQTTAsync_onSuccess5* onSuccess5

A pointer to a callback function to be called if the API call successfully completes. Can be set to NULL, in which case no indication of successful completion will be received. Same deal, the sequel. ✨

MQTTAsync_onFailure5* onFailure5

A pointer to a callback function to be called if the API call successfully completes. Can be set to NULL, in which case no indication of successful completion will be received. (Yes, that's exactly what it says β€” we report, we don't editorialize. πŸ’…)

MQTTProperties properties

MQTT V5 input properties. That's it, that's the whole field. 🌈

MQTTSubscribe_options subscribeOptions

No description given, it just exists and slays in silence. πŸ’œ

int subscribeOptionsCount

Also no description. Just a count, living its truth. ⭐

MQTTSubscribe_options* subscribeOptionsList

Also no description β€” a pointer to a list, being mysterious, main character energy. 🧚


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Paho Asynchronous MQTT C Client Library from the source code. Not a human, not a bestie, just a robot doing its thing. πŸ€–


ngl this page came straight out of the Paho Asynchronous MQTT C source, dated Tue Jun 2 2026 00:00:00, and it's filed under MQTTAsync_...onseOptions(3) in case you ever need to find it again. mwah, bye bestie! πŸ«ΆπŸ’–
πŸ“¦ where this page comes from