How to subscribe for specific room groups updates

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

How to subscribe for specific room groups updates

Post by Alex »

Hi

I'm trying to subscribe for room events only in specific group - is there are a tutorial or short info?
I saw that there is SubscribeRoomGroupRequest which I gues should use - but I'm not sure how exactly.
I also need to know how to unsubscribe.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

You find a simple example of usage in the ASDoc
http://showcase.smartfoxserver.com/2X-P ... quest.html

http://showcase.smartfoxserver.com/2X-P ... quest.html

If you have any specific questions let us know
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

A little clarification, just in case:
when you subscribe to a group the server will do the following:

1- send you the list of rooms in that group
2- keep you updated about new rooms created or rooms that are removed.

When you unsubscribe you loose those Rooms information and no updates are received anymore.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

Post by Alex »

Hi

It looks like when I join the zone - all the rooms(maybe all the rooms in the default group) are sent to the client. How can I stop that - because I want to receive only the rooms from specific group.

1 Join the zone - I don't to receive any rooms here
2 Send SubscribeRoomGroupRequest and get only the rooms I'm interested in
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Remove all the group names from the Default groups setting in the Zone Configuration.
Lapo
--
gotoAndPlay()
...addicted to flash games
Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

Post by Alex »

10x :)
Post Reply