Open jplatte opened 3 years ago
Alternatively, can I store client-specific plugin v4 data in the userdata of the mosquitto
instance passed to the plugin functions? This seems like it couldn't work for setups where multiple (non-collaborating) plugins are loaded, but currently I only care about a single-plugin setup.
This probably can't work either because there would be no sensible place to free the mosquitto
userdata.
@jplatte You're right, this is a significant missing part, and I'm aware it needs writing. There are some examples here: https://github.com/eclipse/mosquitto/tree/master/plugins
Camera hotel gpd
It seems like with a v4 (auth) plugin I can't be notified when a client disconnects to discard client-specific data that I stored in the plugin userdata. The plugin API v5 seems to fix this by allowing one to
mosquitto_callback_register
a callback for disconnect events, but I can't find any documentation on what to pass forevent_data
, nor whatMOSQ_FUNC_generic_callback
is exactly.