Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] More triggers to plugin or external script.

Hi cpascal

There is a hook for disconnection,
look for :  FUNC_auth_plugin_disconnect  in src/security.c
You can create a plugin and implement this hook to do what you want.

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 topic
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.

Regards
Alexandre Zia




On Thu, Sep 17, 2015 at 12:05 AM, 변동호 <cpascal@xxxxxxxxx> wrote:

 

Hello,

 

  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
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev



--

Alexandre Zia
Security
+55 19 3518 5500
+55 19 98153 4618
skype: zia.movile


Back to the top