EndMatch
Terminate the match instance by the owner.
Method Parameters
Parameter | Description |
---|---|
payloadJson | payload data sent in JSON format. It will be relayed to other connnected players. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string payloadJson = "{\"key\":\"value\"}";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.RelayService.EndMatch(payloadJson, successCallback, failureCallback);
const char* payloadJson = "{\"key\":\"value\"}";
_bc->getRelayService()->endMatch(payloadJson, this);
const char* payloadJson = "{\"key\":\"value\"}";
_bc->getRelayService()->endMatch(payloadJson, this);
const char* payloadJson = "{\"key\":\"value\"}";
_bc->getRelayService()->endMatch(payloadJson, this);
var payloadJson = {"key":"value"};
_bc.relay.endMatch(payloadJson, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var payloadJson = {"key":"value"};
ServerResponse result = await _bc.relayService.endMatch(payload:payloadJson);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
// N/A
// N/A