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 |
|
String |
Node UID |
|
String |
Host |
|
Number |
Port |
|
String |
Protocol |
|
Number |
Node type |
|
Object |
Custom property map containing any key-value pairs |
|
Object |
Custom property map containing any key-value pairs for inter-server processing |
room |
Object |
Room information of the created room |
|
String |
Class name of the room |
|
Number |
Room ID |
|
String |
Room owner UID |
|
String |
Room name |
|
Number |
Max number of players who can join the room |
|
Number |
Number of current room members |
|
String |
Room password |
|
Number |
Room state |
|
Boolean |
Flag whether the room is joinable |
|
Number |
Custom search key 1 |
|
Number |
Custom search key 2 |
|
Number |
Custom search key 3 |
|
Number |
Custom search key 4 |
|
Number |
Custom search key 5 |
|
Number |
Custom search key 6 |
|
Number |
Custom search key 7 |
|
Number |
Custom search key 8 |
|
String |
Custom string search key |
|
Object |
Custom property map containing any key-value pairs |
roomMembers |
Array |
Room member information |
|
String |
Class name of the room member |
|
String |
Room member UID |
|
Number |
Room member ID |
|
Number |
Room ID |
|
String |
Room member name |
|
Object |
Custom property map containing any key-value pairs |
replicas |
Array |
Replica information |
|
String |
Class name of the replica |
|
Number |
Room member ID |
|
Number |
Object type |
|
Number |
Room ID |
|
String |
UID of the owner of this replica |
|
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
}
}
]
}