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
 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
         }));
     }
 }