new RoomSettings(name)

Creates a new RoomSettings instance.

The instance must be passed to the CreateRoomRequest class constructor.

Parameter

Name Type Optional Description

name

 

 

The name of the Room to be created.

See also
CreateRoomRequest
SFSRoom

Properties

allowOwnerOnlyInvitation  boolean

Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner.

Default value
true

events  RoomEvents

Sets the flags indicating which events related to the Room are dispatched by the SmartFox client.

Room events include: users entering or leaving the room, user count change and user variables update. If set to null, the events configured on the server-side are used (see the SmartFoxServer 2X Administration Tool documentation).

Default value
null

extension  RoomExtension

Sets the Extension that must be attached to the Room on the server-side, and its settings.

Default value
null

groupId  string

Sets the id of the Group to which the Room should belong.

If the Group doesn't exist yet, a new one is created before assigning the Room to it.

Default value
"default"
See also
SFSRoom#groupId

isGame  boolean

Sets whether the Room is a Game Room or not.

Default value
false

maxSpectators  number

Sets the maximum number of spectators allowed in the Room (only for Game Rooms).

Default value
0

maxUsers  number

Sets the maximum number of users allowed in the Room.

In case of Game Rooms, this is the maximum number of players.

Default value
10

maxVariables  number

Sets the maximum number of Room Variables allowed for the Room.

Default value
5

name  string

Defines the name of the Room.

password  string

Sets the password of the Room.

If the password is set to an empty string, the Room won't be password protected.

Default value
An empty string

permissions  RoomPermissions

Sets the flags indicating which operations are permitted on the Room.

Permissions include: name and password change, maximum users change and public messaging. If set to null, the permissions configured on the server-side are used (see the SmartFoxServer 2X Administration Tool documentation).

Default value
null

variables  Array of SFSRoomVariable

Sets a list of SFSRooomVariable objects to be attached to the Room.

Default value
An empty array