adafruit / Adafruit_CircuitPython_MiniMQTT

MQTT Client Library for CircuitPython
Other
80 stars 49 forks source link

allow to set user data for the callback functions #135

Closed vladak closed 1 year ago

vladak commented 1 year ago

I'd like to pass an object to the callback functions. There is a weak-private attribute _user_data that is set to None in the __init__ function https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/blob/0e5bb0c5a1e25c339131a9d7699f40f6b39fe190/adafruit_minimqtt/adafruit_minimqtt.py#L178 however there does not seem any public way to set it.