Skip to main content
Version: 5.9.0

RegisterEventCallback

caution

This method is now deprecated. For real-time events, you should use the RTT API method, RegisterRTTEventCallback(), instead.

Sets a callback handler for any out of band event messages that come from brainCloud.

Method Parameters

ParameterDescription
eventCallbackA function which takes a JSON string as it's only parameter.

Usage

http://localhost:3000
_bc.RegisterEventCallback(callbackFunction);
JSON Response
{
"events": [
{
"fromPlayerId": "178ed06a-d575-4591-8970-e23a5d35f9df",
"eventId": 3967,
"createdAt": 1441742105908,
"gameId": "123",
"toPlayerId": "178ed06a-d575-4591-8970-e23a5d35f9df",
"eventType": "test",
"eventData": {
"testData": 117
}
}
]
}