Send an Extension Response with room.getUserList() ?

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

Moderators: Lapo, Bax

User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Send an Extension Response with room.getUserList() ?

Postby coolboy714cp » 28 Feb 2012, 04:59

I was just wondering how I can send an extension reponse with the room's user list, as an array, back to the client to be handled on the EXTENSION_RESPONSE handler. I've been trying to do this for a while now and just can't get the coding correct. I'm still learning Java, so any help would be greatly appreciated!
jdjebbfiie38384
Posts: 13
Joined: 09 Dec 2011, 03:28

Re: Send an Extension Response with room.getUserList() ?

Postby jdjebbfiie38384 » 28 Feb 2012, 05:46

send("YourExtensionName", rtnObj, parentRoom.getUserList());
parentRoom being the room object
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Send an Extension Response with room.getUserList() ?

Postby Lapo » 29 Feb 2012, 12:23

It's not clear if you want to send the list of Rooms as the response data, or if you want to send your response to all people in that Room.
Which one?
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Re: Send an Extension Response with room.getUserList() ?

Postby coolboy714cp » 01 Mar 2012, 01:36

I'm wanting to send the room's user list to one user.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Send an Extension Response with room.getUserList() ?

Postby Bax » 01 Mar 2012, 10:34

coolboy714cp wrote:I'm wanting to send the room's user list to one user.

Then the courageous' answer is wrong. You have to use a loop to go through the list of users, retrieve the details you need and send them as a list of SFSObjects.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 43 guests