SetRoomVariablesRequest

Sets one or more Room Variables in a Room.


When a Room Variable is created/updated, the SFSEvent.ROOM_VARIABLES_UPDATE event is dispatched to all the Users in the target Room, including the User which created/updated it. Also, if the Room Variable is global (see the SFSRoomVariable class description), the event is dispatched to all client which subscribed the Group to which the target Room belongs.

Constructor

new SetRoomVariablesRequest(roomVariables, roomopt)

Creates a new instance of the SetRoomVariablesRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
roomVariablesArray.<SFSRoomVariable>A list of objects representing the Room Variables to set.
roomSFSRoom<optional>
nullAn object representing the Room where to set the Room Variables; if null, the last Room joined by the User is used.