Ok, now it is clear, thank you.
I think you need an entirely different strategy. I would suggest you don't subscribe the client to the group, this way he will not receive any room lists.
What you need to do is running a server side findRooms(...)
call. Here you can filter all the Rooms that are in "wait" state and send the list to User.
Take a look at this article, which describes MatchExpressions which are used by the findRoom method:http://docs2x.smartfoxserver.com/Advanc ... s/game-api
Also we wrote a recent article about MatchExpressions here: http://smartfoxserver.com/blog/?p=426
Here is the pseudo code of what I am talking about:
Code: Select all
// Filter all Rooms that have a RoomVariable 'waiting' set to true
MatchExpression exp = new MatchExpression('waiting', BoolMatch.EQUALS, true);
// Obtain the list of Rooms from a specific group
List<Room> rooms = getParentZone().getRoomListFromGroup("MyRoomGroup");
// Find up to 5 rooms matching the provided expression
List<Room> filteredRoomList = getApi().findRooms(rooms, exp, 5);
// ... Send the Room list to the client ...
Hope it helps