how to know when a user unsubscribed from a topic/channel

7 views
Skip to first unread message

schz

unread,
Jul 22, 2010, 4:57:17 PM7/22/10
to StreamHub Comet Server Community
Im building a simple chatroom application, Even tho this is my first
real attempt at Java, Ive gotten pretty far. But I'm now stuck at the
problem of how to inform everyone in the chatroom when somebody
disconnects.

I know how to use the onSubscribe method to inform everyone of a new
user arrival and update the user list, but onUnSubscribe doesnt seem
to ever get called. What is the best way to do this?

Thanks!

schz

unread,
Jul 22, 2010, 5:15:14 PM7/22/10
to StreamHub Comet Server Community
Hmm, I think onSubscribe and onUnSubscribe get fired more often than
what I thought. If I leave a comet session (browse to another page,
close the browser) after a couple of minutes onUnSubscribe seems to
fire 4 or 5 times.

Is there a way to list all of a channels subscribers at a particular
time?
Reply all
Reply to author
Forward
0 new messages