CancelFindRequest
Cancels any FindLobby or FindOrCreateLobby requests that have been previously submitted by the caller for the given lobbyType.
Service | Operation |
---|---|
lobby | CANCEL_FIND_REQUEST |
Method Parameters
Parameter | Description |
---|---|
lobbyType | Type of lobby being targeted. |
entryId | Specific entry id to cancel. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string lobbyType = "4v4";
string entryId = "cxckfek-ir";
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.LobbyService.CancelFindRequest(lobbyType, entryId, successCallback, failureCallback);
const char *lobbyType = "4v4";
const char *entryId = "cxckfek-ir";
_bc->getLobbyService()->cancelFindRequest(lobbyType, entryId, this);
// Coming soon
String lobbyType = "4v4";
String entryId = "cxckfek-ir";
this; // implements IServerCallback
_bc.getLobbyService().cancelFindRequest(lobbyType, entryId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var lobbyType = "4v4";
var entryId = "cxckfek-ir";
_bc.lobby.cancelFindRequest(lobbyType, entryId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var lobbyType = "4v4";
var entryId = "cxckfek-ir";
ServerResponse result = await _bc.lobbyService.cancelFindRequest(lobbyType:lobbyType, entryId:entryId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var lobbyType = "4v4";
var entryId = "cxckfek-ir";
var lobbyProxy = bridge.getLobbyServiceProxy();
var postResult = lobbyProxy.cancelFindRequest(lobbyType, entryId);
if (postResult.status == 200) {
// Success!
}
{
"service": "lobby",
"operation": "CANCEL_FIND_REQUEST",
"data": {
"lobbyType": "4v4",
"entryId": "cxckfek-ir"
}
}