6

I am trying to make a chat on my website looking like google talk. I want to manage the disconnect event. A user can disconnect on several way :

  • By clicking the disconnect button (easy to push the event to his friends)
  • By close his windows (I can send the event to windows close javascript event but if the user has many windows open on my website, i don't want to disconnect him.)

So, how can i detect when my connection on a channel is closed? Each user has his own channel build with his id.

Thank you for help.

Sebastien
  • 6,640
  • 14
  • 57
  • 105

1 Answers1

5

You can check out the meta events, /meta/unsubscribe and /meta/disconnect.

More info here: Faye Monitoring

Heinrich Lee Yu
  • 1,472
  • 15
  • 31