Click or drag to resize

SFSRoom Class

The SFSRoom object represents a SmartFoxServer Room entity on the client.
Inheritance Hierarchy
SystemObject
  Sfs2X.EntitiesSFSRoom
    Sfs2X.EntitiesMMORoom

Namespace:  Sfs2X.Entities
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public class SFSRoom : Room

The SFSRoom type exposes the following members.

Properties
  NameDescription
Public propertyCapacity
Returns the maximum amount of users, including spectators, that can be contained in this Room.
Public propertyGroupId
Returns the Room Group name.
Public propertyId
Indicates the id of this Room.
Public propertyIsGame
Indicates whether this is a Game Room or not.
Public propertyIsHidden
Indicates whether this Room is hidden or not.
Public propertyIsJoined
Indicates whether the client joined this Room or not.
Public propertyIsPasswordProtected
Indicates whether this Room requires a password to be joined or not.
Public propertyMaxSpectators
Returns the maximum number of spectators allowed in this Room (Game Rooms only).
Public propertyMaxUsers
Returns the maximum number of users allowed in this Room.
Public propertyName
Indicates the name of this Room.
Public propertyPlayerList
Returns a list of User objects representing the players currently inside this Room (Game Rooms only).
Public propertyProperties
Defines a generic utility object that can be used to store custom Room data.
Public propertySpectatorCount
Returns the current number of spectators in this Room (Game Rooms only).
Public propertySpectatorList
Returns a list of User objects representing the spectators currently inside this Room (Game Rooms only).
Public propertyUserCount
Returns the current number of users in this Room.
Public propertyUserList
Returns a list of User objects representing all the users currently inside this Room.
Top
Methods
  NameDescription
Public methodContainsUser
Indicates whether the specified user is currently inside this Room or not.
Public methodContainsVariable
Indicates whether this Room has the specified Room Variable set or not.
Public methodGetUserById
Retrieves a User object from its id property.
Public methodGetUserByName
Retrieves a User object from its name property.
Public methodGetVariable
Retrieves a Room Variable from its name.
Public methodGetVariables
Retrieves all the Room Variables of this Room.
Public methodToString
Returns a string that contains the Room id, name and id of the Group to which it belongs.
(Overrides ObjectToString.)
Top
Remarks
The SmartFoxServer 2X client API are not aware of all the Rooms which exist on the server side, but only of those that are joined by the user and those in the Room Groups that have been subscribed. Subscribing to one or more Groups allows the client to listen to Room events in specific "areas" of the Zone, without having to retrieve and keep synchronized the details of all available Rooms, thus reducing the traffic between the client and the server considerably.

The list of available Rooms is created after a successful login and it is kept updated continuously by the server.

See Also