Room State Changed

This notification is sent when a room state is changed.

Sent JSON includes the following:

Note

To use Room State Changed callback, you need to specify replica types of that you need information as a comma separated list in the Replica Types To Report field on Options Page on Applications Dashboard.

replicas in the JSON sent out contains replicas having one of the replica types specified here.

JSON Key

Type

Description

roomId

Number

Room ID

node

Object

Sender node information

  • uid

String

Node UID

  • host

String

Host

  • port

Number

Port

  • protocol

String

Protocol

  • type

Number

Node type

  • properties

Object

Custom property map containing any key-value pairs

  • internalProperties

Object

Custom property map containing any key-value pairs for inter-server processing

room

Object

Room information of the created room

  • @class

String

Class name of the room

  • primaryKey

Number

Room ID

  • ownerUid

String

Room owner UID

  • name

String

Room name

  • capacity

Number

Max number of players who can join the room

  • memberCount

Number

Number of current room members

  • password

String

Room password

  • state

Number

Room state

  • isJoinable

Boolean

Flag whether the room is joinable

  • key1

Number

Custom search key 1

  • key2

Number

Custom search key 2

  • key3

Number

Custom search key 3

  • key4

Number

Custom search key 4

  • key5

Number

Custom search key 5

  • key6

Number

Custom search key 6

  • key7

Number

Custom search key 7

  • key8

Number

Custom search key 8

  • stringKey

String

Custom string search key

  • properties

Object

Custom property map containing any key-value pairs

roomMembers

Array

Room member information

  • @class

String

Class name of the room member

  • uid

String

Room member UID

  • primaryKey

Number

Room member ID

  • roomId

Number

Room ID

  • name

String

Room member name

  • properties

Object

Custom property map containing any key-value pairs

replicas

Array

Replica information

  • @class

String

Class name of the replica

  • primaryKey

Number

Room member ID

  • objectType

Number

Object type

  • roomId

Number

Room ID

  • ownerUid

String

UID of the owner of this replica

  • properties

Object

Custom property map containing any key-value pairs

Example JSON

{
    "roomId": 2,
    "node": {
        "uid": "[ServerUID:1]",
        "host": "192.0.2.100",
        "port": 9123,
        "protocol": "TCP",
        "type": 1,
        "properties": {},
        "internalProperties": {}
    },
    "room": {
        "@class": "jp.co.soft_gear.strix.server.match.room.model.CustomizableMatchRoom",
        "primaryKey": 2,
        "ownerUid": "[ChildUID:1-2]",
        "name": "New Room",
        "capacity": 4,
        "memberCount": 1,
        "password": null,
        "state": 1,
        "isJoinable": true,
        "key1": 1.100000023841858,
        "key2": 2.200000047683716,
        "key3": 3.299999952316284,
        "key4": 4.400000095367432,
        "key5": 5.5,
        "key6": 6.599999904632568,
        "key7": 7.699999809265137,
        "key8": 8.800000190734863,
        "stringKey": "asdf",
        "properties": {
            "foo": "bar",
            "x": 1.3,
            "rank": 10
        }
    },
    "roomMembers": [
        {
            "@class": "jp.co.soft_gear.strix.server.match.room.model.CustomizableMatchRoomMember",
            "uid": "[ChildUID:1-2]",
            "primaryKey": 2,
            "roomId": 2,
            "name": "Alice",
            "properties": {
                "equipments": [
                    1,
                    5,
                    7,
                    8,
                    12
                ],
                "rank": 5,
                "userId": 1,
                "email": "alice@example.com"
            }
        }
    ],
    "replicas": [
        {
            "@class": "jp.co.soft_gear.strix.server.replica.model.Replica",
            "primaryKey": 83,
            "objectType": 262148,
            "roomId": 2,
            "ownerUid": "[ChildUID:1-2]",
            "properties": {
                "0": 5,
                "1": -4.6679677e-8,
                "2": 0,
                "3": -0.51490444,
                "4": 0,
                "5": 0,
                "6": 0,
                "7": 0,
                "8": 8.064373e-35,
                "9": 0,
                "163912052": false,
                "651389496": false,
                "1321853660": 0,
                "1387945652": 0,
                "1731841942": 0,
                "-1249823392": false,
                "-1432260669": 0,
                "-905407573": false,
                "-358706279": 0,
                "-2057251316": 0,
                "-2101712150": 0,
                "-1342444212": 100,
                "-1314670598": 0,
                "-2017942076": 100
            }
        }
    ]
}