public static string FormattedString(this ApolloLoginInfo info) { string account = string.Format("AccountInfo{{platform:{0} channel:{1} openid:{2}}}", info.AccountInfo.Platform, info.AccountInfo.Channel, info.AccountInfo.OpenId); string waiting = string.Format("WaitingInfo{{pos:{0} queue_len:{1} estimate_time:{2}}}", info.WaitingInfo.Pos, info.WaitingInfo.QueueLen, info.WaitingInfo.EstimateTime); string server = string.Format("ServerInfo{{route_type:{0} server_id:{1}}} ip:{2}", info.ServerInfo.RouteType, info.ServerInfo.ServerId, info.CurrentIp); return(string.Format("[{3:HH:mm:ss.fff} ApolloLoginInfo]{0} {1} {2}", account, waiting, server, DateTime.Now)); }
protected override void DealConnectFail(ApolloResult result, ApolloLoginInfo loginInfo) { this.reconPolicy.StartPolicy(result); MonoSingleton <Reconnection> .instance.QueryIsRelayGaming(result); List <KeyValuePair <string, string> > events = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()), new KeyValuePair <string, string>("status", "1"), new KeyValuePair <string, string>("type", "challenge"), new KeyValuePair <string, string>("errorCode", result.ToString()) }; Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_SvrConnectFail", events, true); }
private void onConnectEvent(ApolloResult result, ApolloLoginInfo loginInfo) { if (this.connector != null) { if (result == ApolloResult.Success) { this.connected = true; this.DealConnectSucc(); } else { this.DealConnectFail(result, loginInfo); } } }
protected override void DealConnectFail(ApolloResult result, ApolloLoginInfo loginInfo) { this.reconPolicy.StartPolicy(result, 6); MonoSingleton <Reconnection> .get_instance().QueryIsRelayGaming(result); List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >(); list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion())); list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString())); list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString())); list.Add(new KeyValuePair <string, string>("openid", "NULL")); list.Add(new KeyValuePair <string, string>("status", "0")); list.Add(new KeyValuePair <string, string>("type", "challenge")); list.Add(new KeyValuePair <string, string>("errorCode", result.ToString())); Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_SvrConnectFail", list, true); }
protected override void DealConnectFail(ApolloResult result, ApolloLoginInfo loginInfo) { this.lastResult = result; if ((result == ApolloResult.StayInQueue) || (result == ApolloResult.SvrIsFull)) { MonoSingleton <TdirMgr> .GetInstance().ConnectLobby(); } else { this.reconPolicy.StartPolicy(result); } List <KeyValuePair <string, string> > events = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()), new KeyValuePair <string, string>("status", "1"), new KeyValuePair <string, string>("type", "platform"), new KeyValuePair <string, string>("errorCode", result.ToString()) }; Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_SvrConnectFail", events, true); }
protected override void DealConnectFail(ApolloResult result, ApolloLoginInfo loginInfo) { this.lastResult = result; if (result == ApolloResult.StayInQueue || result == ApolloResult.SvrIsFull) { MonoSingleton <TdirMgr> .GetInstance().ConnectLobby(); } else { this.reconPolicy.StartPolicy(result, 10); } List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >(); list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion())); list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString())); list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString())); list.Add(new KeyValuePair <string, string>("openid", "NULL")); list.Add(new KeyValuePair <string, string>("status", "0")); list.Add(new KeyValuePair <string, string>("type", "platform")); list.Add(new KeyValuePair <string, string>("errorCode", result.ToString())); Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_SvrConnectFail", list, true); }
protected virtual void DealConnectFail(ApolloResult result, ApolloLoginInfo loginInfo) { }
//MARK: Connection Events Handle private void ApolloConnectHandler(ApolloResult result, ApolloLoginInfo loginInfo) { DispatchConnectEvent(ConnectEventType.CONNECT, result); Debug.Log(loginInfo.FormattedString()); }