示例#1
0
        protected void HandleConnectionError(ServerErrorType errorType = ServerErrorType.General, string errorDetails = null)
        {
            IsConnected = false;

            //if (!Stopped)
            {
                Disconnect();
                //SendServerUpdate(ServerUpdateType.Error, errorType, errorDetails);
            }
        }
示例#2
0
        public ServerError(ServerErrorType errorType)
        {
            switch (errorType)
            {
            case ServerErrorType.ALREADY_MATCHED:
                ErrMsg = "already matched player"; break;

            default:
                ErrMsg = "none"; break;
            }
        }
示例#3
0
 /// <summary>
 /// Метод для передачи статусов ошибок
 /// </summary>
 /// <param name="type">тип ошибки</param>
 /// <param name="message">сообщение об ошибке</param>
 private void CallErrorServer(ServerErrorType type, string message = "")
 {
     Task.Factory.StartNew(() => { ServerErrors?.Invoke(this, new Arguments.ErrorServerArgs(type, message)); });
 }
示例#4
0
 public ServerUpdateEventArgs(ServerUpdateType type, ServerErrorType errorType = ServerErrorType.None, string errorDetails = null)
 {
     Type         = type;
     ErrorType    = errorType;
     ErrorDetails = errorDetails;
 }
示例#5
0
 internal ErrorServerArgs(ServerErrorType type, string message)
 {
     Type    = type;
     Message = message;
 }