arunoda / meteor-streams

Realtime messaging for Meteor
http://arunoda.github.io/meteor-streams
MIT License
287 stars 97 forks source link

Handle disconnect events #9

Closed sylvaingi closed 10 years ago

sylvaingi commented 10 years ago

While looking at the source, I have found that there are undocumented client disconnection handlers in ther server code, but I can't find a way to use them.

Can you give an example on how they should be implemented?

arunoda commented 10 years ago

It's there with this.onDisconnect in the server side on see: http://arunoda.github.io/meteor-streams/stream-context.html

sample: http://arunoda.github.io/meteor-streams/communication-patterns.html (see last pattern)

sylvaingi commented 10 years ago

Oh right! I have looked a bit too far.. Thank you!