|Re: [mosquitto-dev] More triggers to plugin or external script.|
typedef int (*FUNC_auth_plugin_version)(void); typedef int (*FUNC_auth_plugin_init)(void **, struct mosquitto_auth_opt *, int); typedef int (*FUNC_auth_plugin_cleanup)(void *, struct mosquitto_auth_opt *, int); typedef int (*FUNC_auth_plugin_security_init)(void *, struct mosquitto_auth_opt *, int, bool); typedef int (*FUNC_auth_plugin_security_cleanup)(void *, struct mosquitto_auth_opt *, int, bool); typedef int (*FUNC_auth_plugin_acl_check)(void *, const char *, const char *, const char *, int); typedef int (*FUNC_auth_plugin_unpwd_check)(void *, const char *, const char *); typedef int (*FUNC_auth_plugin_psk_key_get)(void *, const char *, const char *, char *, int);
Thank you very much, Alexandre Zia.
But I cannot find the FUNC_auth_plugin_disconnect in src/security.c
And, using "(dis)connect" topic is good idea, but user-applications on mobile environment can be network-unconnectable suddenly. So user-application cannot send the last message, so the last message should be determine by MQTT broker.
Then I think disconnect plugin is needed still.
Where can I look for the FUNC_auth_plugin_disconnect?
Many thanks in advance.
P.S. Please apology me that I'm not good in English well, so I could mis-understand or saying using wrong wording.
From: "Alexandre Zia"<alexandre.zia@xxxxxxxxxx>
To: "변동호"<cpascal@xxxxxxxxx>; "General development discussions for the mosquitto project"<mosquitto-dev@xxxxxxxxxxx>;
Sent: 2015-09-17 (목) 12:31:03
Subject: Re: [mosquitto-dev] More triggers to plugin or external script.
Then create an application to subscribe to this topic and you will receive a disconnect message from the broker whenever a user disconnects, if you put the username in the paylod you can easily identify the user.However, there is an easier way to acomplish what you want, just set last will message for each user connecting to you application and make it publish in a determined topicYou can create a plugin and implement this hook to do what you want.Hi cpascalThere is a hook for disconnection,
look for : FUNC_auth_plugin_disconnect in src/security.c
On Thu, Sep 17, 2015 at 12:05 AM, 변동호 <cpascal@xxxxxxxxx> wrote:
I'm trying to make general-purpose channel-chatting server for mobile devices, using mosquitto.
- Max. user limit: 100 per channel
- Users have own nicknames.
- Userlist visible for each channel.
I'm using mosquitto brokers as front-end servers, and using php REST services for userlist(redis) in the channels.
Also, I've made a client using C/C++.. Everything works well except I cannot determine the users is disconncted by network unavailablity. I want delete the user in the userlist..
I think it's very easy if mosquitto supports a trigger(auth_plugin?) on disconnect. :)
Many thanks in advance.
mosquitto-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
Back to the top