user_count_change event problem
Posted: 24 Feb 2012, 12:42
hi,
i noticed a very peculiar behaviour.
Earlier i was maintaining an onlineuserlist by listening to the user_enter and user_exit events in the lobbyroom.
so lets say Mr.A is in the lobbyroom he would be listening for user_enter, user_exit. so when Mr.B comes in then A's onlineuserlist will display A,B.
i heard that enabling these two events is bandwidth intensive if lots of users come in the lobbyroom and leave it very frequently. so i disables these two events in the roompermissions&events in admin tool for the lobby room. now only user_count_change event is enabled. and now Mr.A listens only to user_count change. the funny behaviour now :
1. Mr. B enters the lobby room. MrA is getting the user_count_change event saying uc:2 but i am seeing that the for the user_count_change event contains only Mr.A ! why not Mr.B also since uc = 2 ?
2. Now i saw this problem and went serverside and enabled user_enter user_exit along with user_count_change.
on client side still listening only to user_count_change. This time when Mr.B joined, Mr.A got the user_count_change event, and the was containing both Mr.A and Mr.B which is what i wanted!
the Q is does user_count_change event require user_enter and user_exit to be fired? if so where is the bandwidth saving?
any ideas?
thanks.
i noticed a very peculiar behaviour.
Earlier i was maintaining an onlineuserlist by listening to the user_enter and user_exit events in the lobbyroom.
so lets say Mr.A is in the lobbyroom he would be listening for user_enter, user_exit. so when Mr.B comes in then A's onlineuserlist will display A,B.
i heard that enabling these two events is bandwidth intensive if lots of users come in the lobbyroom and leave it very frequently. so i disables these two events in the roompermissions&events in admin tool for the lobby room. now only user_count_change event is enabled. and now Mr.A listens only to user_count change. the funny behaviour now :
1. Mr. B enters the lobby room. MrA is getting the user_count_change event saying uc:2 but i am seeing that the
Code: Select all
(event.params.room as sfsroom).userlist2. Now i saw this problem and went serverside and enabled user_enter user_exit along with user_count_change.
on client side still listening only to user_count_change. This time when Mr.B joined, Mr.A got the user_count_change event, and the
Code: Select all
(event.params.room as sfsroom).userlistthe Q is does user_count_change event require user_enter and user_exit to be fired? if so where is the bandwidth saving?
any ideas?
thanks.