getPeople Example - explanation needed

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
sbn888
Posts: 4
Joined: 15 Jan 2011, 02:44

getPeople Example - explanation needed

Post by sbn888 »

I have gotten the Database Recipe Get People Example working (using the same config for the server admin tool).

When I view the code for the client, I see this line in the onLogin handler.

sfs.send(new ExtensionRequest("getPeople", new SFSObject()))

Can someone explain the reference to "getPeople". How is it being used? Since it is not used in the naming of the extension or in the extension configuration, how does the client know which extension to call (eg Zone vs Room extension)? Is it an arbitrary name?

Also, why are we passing a new empty object to the server.

Thanks
Sbn
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

You posted this in the wrong forum section, so this thread has been moved to an more appropriate section.
Smartfox's forum is my daily newspaper.
sbn888
Posts: 4
Joined: 15 Jan 2011, 02:44

Post by sbn888 »

Note to self: RTFM

ExtensionRequest () Constructor
------------------------------------------------

extCmd:String — The name of the command which identifies an action that should be executed by the server-side Extension.

params:ISFSObject — An instance of SFSObject containing custom data to be sent to the Extension.

room:Room (default = null) — If null, the specified command is sent to the current Zone server-side Extension; if not null, the command is sent to the server-side Extension attached to the passed Room.

useUDP:Boolean (default = false) — If not true, the UDP protocol is used to send the request to the server (check the SmartFox.udpAvailable property for more informations).


So I guess the name of the command can be anything you want it to be as it is an identifier
Post Reply