Click or drag to resize

SFSUser Class

The SFSUser object represents a client logged in SmartFoxServer.
Inheritance Hierarchy
SystemObject
  Sfs2X.EntitiesSFSUser

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

The SFSUser type exposes the following members.

Properties
  NameDescription
Public propertyAOIEntryPoint
Returns the entry point of this user in the current user's AoI.
Public propertyId
Indicates the id of this user.
Public propertyIsItMe
Indicates if this User object represents the current client.
Public propertyIsPlayer
Indicates whether this user is a player (playerId greater than 0) in the last joined Room or not.
Public propertyIsSpectator
Indicates whether this user is a spectator (playerId lower than 0) in the last joined Room or not.
Public propertyName
Indicates the name of this user.
Public propertyPlayerId
Returns the id of this user as a player in a Game Room.
Public propertyPrivilegeId
Returns the id which identifies the privilege level of this user.
Public propertyProperties
Defines a generic utility object that can be used to store custom user data.
Top
Methods
  NameDescription
Public methodContainsVariable
Indicates whether this user has the specified User Variable set or not.
Public methodGetPlayerId
Returns the playerId value of this user in the passed Room.
Public methodGetVariable
Retrieves a User Variable from its name.
Public methodGetVariables
Retrieves all the User Variables of this user.
Public methodIsAdmin
Indicates whether this user logged in as an administrator or not.
Public methodIsGuest
Indicates whether this user logged in as a guest or not.
Public methodIsJoinedInRoom
Indicates whether this user joined the passed Room or not.
Public methodIsModerator
Indicates whether this user logged in as a moderator or not.
Public methodIsPlayerInRoom
Indicates whether this user is a player (playerId greater than 0) in the passed Room or not.
Public methodIsSpectatorInRoom
Indicates whether this user is a spectator (playerId lower than 0) in the passed Room or not.
Public methodIsStandardUser
Indicates whether this user logged in as a standard user or not.
Public methodToString
Returns a string that contains the user id, name and a boolean indicating if the this object represents the current client.
(Overrides ObjectToString.)
Top
Remarks
The SmartFoxServer 2X client API are not aware of all the clients (users) connected to the server, but only of those that are in the same Rooms joined by the current client; this reduces the traffic between the client and the server considerably. In order to interact with other users the client should join other Rooms or use the Buddy List system to keep track of and interact with friends.
See Also