SysRoomEvent
Arbitrary method for calling the script associated with a directly launched hosted server instance.
Service | Operation |
---|---|
roomServer | SYS_ROOM_EVENT |
Method Parameters
Parameter | Description |
---|---|
event | Custom data object. |
brainCloudContext | Data provided by brainCloud when the server instance was launched. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var event = {
"123": "456"
};
var brainCloudContext = {
"scriptId": "my-script-id",
"scriptData": {
"abc": "xyz"
}
};
var roomServerProxy = bridge.getRoomserverServiceProxy();
var postResult = roomServerProxy.sysRoomEvent(event, brainCloudContext);
{
"service":"roomServer",
"operation":"SYS_ROOM_EVENT",
"data":{
"event":{
"123":"456"
},
"brainCloudContext":{
"scriptId":"my-script-id",
"scriptData":{
"abc":"xyz"
}
}
}
}
JSON Response
{
"status" : 200,
"data" : {}
}