private void OnError(object sender, ErrorArg e) { DebugUtil.LogError <RealTimeHandler>(DebugLocation.RealTime, "OnError", e.Error); if (PlayerHash != -1) { try { if (GameService.HandlerType == EventHandlerType.NativeContext) { RealTimeEventHandlers.Reconnected?.Invoke(null, ReconnectStatus.Connecting); } else { GameService.SynchronizationContext?.Send( delegate { RealTimeEventHandlers.Reconnected?.Invoke(null, ReconnectStatus.Connecting); }, null); } } catch (Exception) { // ignored } } if (_isDisposed) { return; } Init(true); }
protected void OnClosed(ErrorArg errorArg) { IsAvailable = false; if (Type == GSLiveType.Command) { CommandEventHandlers.GsCommandClientError?.Invoke(null, new GameServiceException(errorArg.Error)); } else { TurnBasedEventHandlers.GsTurnBasedClientError?.Invoke(null, new GameServiceException(errorArg.Error)); } }
protected void OnClosed(ErrorArg errorArg) { Error?.Invoke(this, errorArg); }
private void HandleError(ErrorArg EA, string Errornm) { Func <ErrorArg, int> Callback = ErrorHandlers[Errornm]; Callback.Invoke(EA); }