Getting the user list of a Zone

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

grgrdvrt
Posts: 1
Joined: 04 Jan 2011, 09:40

Getting the user list of a Zone

Postby grgrdvrt » 04 Jan 2011, 09:58

I need to get the list of all users of a zone, not just the rooms joind by the client provided by SFSUserManager.getUserList()

I guess it is possible because that list appears in the zone monitor of the admin tool

Does the client have to join all the room to access this data? I'm not sure it's the best way to do it...


thank you
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Jan 2011, 13:21

From client side it's not very easy and the reason is that a Zone can potentially contain tens or even hundreds of thousands of Users. This would in turn return a huge packet of data.

In general it's wrong trying to do this from client, or let's say it is bad practice. If you need to access that sort of data do it from server side by adding an extension to your Zone.

Otherwise try to organize your users in Rooms and Room Groups and work with those in order to avoid huge data transfers.
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 37 guests