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));
            }
        }
Esempio n. 3
0
 protected void OnClosed(ErrorArg errorArg)
 {
     Error?.Invoke(this, errorArg);
 }
Esempio n. 4
0
            private void HandleError(ErrorArg EA, string Errornm)
            {
                Func <ErrorArg, int> Callback = ErrorHandlers[Errornm];

                Callback.Invoke(EA);
            }