Ejemplo n.º 1
0
 void FireOnTerminatedEvent(string message)
 {
     Log(LogLevel.Info, tr => tr.Set($"OnTerminated: {message}"));
     OnTerminated?.Invoke(this, new SocketEventArgs()
     {
         ErrorMessage = message, ErrorType = EFTClientIPErrorType.Socket_GeneralError
     });
 }
Ejemplo n.º 2
0
 void FireOnTerminatedEvent(string message)
 {
     logger.Error($"OnTerminated: {message}");
     OnTerminated?.Invoke(this, new SocketEventArgs()
     {
         ErrorMessage = message, ErrorType = ClientIPErrorType.Socket_GeneralError
     });
 }
 private void SendOnTerminated()
 {
     OnTerminated?.Invoke(
         this,
         new ClusterEventArgs <Terminated>(
             DateTime.Now,
             new Terminated {
         Succeed = true
     }));
 }
Ejemplo n.º 4
0
        public TSK_StateMachine(Int32 currentState, Int32 termState, OnTerminated onTerminated, Object userData)
        {
            mCurrentSate  = currentState;
            mTermState    = termState;
            mOnTerminated = onTerminated;
            mUserData     = userData;
            mEntries      = new List <Entry>();
#if WINDOWS_PHONE
            mMutex = new Mutex(false, TSK_String.Random()); // unnamed mutex
#else
            mMutex = new Mutex();
#endif
        }
Ejemplo n.º 5
0
 public TSK_StateMachine(Int32 currentState, Int32 termState, OnTerminated onTerminated, Object userData)
 {
     mCurrentSate = currentState;
     mTermState = termState;
     mOnTerminated = onTerminated;
     mUserData = userData;
     mEntries = new List<Entry>();
     #if WINDOWS_PHONE
     mMutex = new Mutex(false, TSK_String.Random()); // unnamed mutex
     #else
     mMutex = new Mutex();
     #endif
 }
Ejemplo n.º 6
0
 private void Ws_Closed(IWebSocket sender, WebSocketClosedEventArgs args)
 {
     if (args.Code == 4000)
     {
         OnTerminated?.Invoke(this, new ClusterEventArgs <Terminated>(
                                  DateTime.Now,
                                  new Terminated {
             Succeed = true
         }));
     }
     else
     {
         OnTerminated?.Invoke(this, new ClusterEventArgs <Terminated>(
                                  DateTime.Now,
                                  new Terminated {
             Succeed = false, Message = args.Reason
         }));
     }
 }