Hi I'm using Unity and getting error code 4 response from the following code:
WarpClient.initialize(GlobalContext.API_KEY, GlobalContext.HOST_NAME);
WarpClient.setRecoveryAllowance(60);
GlobalContext.warpClient = WarpClient.GetInstance();
Here is the code for ConnectionListener onConnectionDone()
public void onConnectDone(ConnectEvent eventObj)
{
UnityEngine.Debug.Log("In ConnectionListiner onConnectionDone & response code: " + eventObj.getResult().ToString());
switch (eventObj.getResult())
{
// successfully established a new connection
case WarpResponseResultCode.SUCCESS:
GlobalContext.IsConnectedToAppWarp = true;
_recoverCounts = 0;
if (GlobalContext.tableProperties["IsPrivateRoom"].Equals("false"))
{
UnityEngine.Debug.Log("In ConnectionListiner onConnectDone before joinRoomWithProperties()");
WarpClient.GetInstance().JoinRoomWithProperties(GlobalContext.tableProperties);
}
break;
// non-recoverable connection error
case WarpResponseResultCode.CONNECTION_ERR:
UnityEngine.Debug.Log("In ConnectionListiner onConnectionDone CONNECTION_ERR & response code: " + eventObj.getResult().ToString());
break;
// Indicates incorrect api and secret key pair
case WarpResponseResultCode.AUTH_ERROR:
UnityEngine.Debug.Log("In ConnectionListiner onConnectionDone AUTH_ERROR & response code: " + eventObj.getResult().ToString());
break;
// Recoverable connection error
case WarpResponseResultCode.CONNECTION_ERROR_RECOVERABLE:
break;
// Successfully recovered the previous connection
case WarpResponseResultCode.SUCCESS_RECOVERED:
break;
default:
if (App.CurrentPage.Equals("HomePage"))
EventManager.ConnectionHasFailed();
GlobalContext.IsConnectedToAppWarp = false;
break;
}
}
Not sure why this is happening in Unity, I know server is fine and running as I can connect to it from a Windows Phone app?
Any ideas?
Thanks