예제 #1
0
 private void OnTcpComm_ConnectionEstablished(object sender, ConnectionStateChangedEventArgs e)
 {
     try
     {
         this.CreateSession(e.Client.SessionId, e.Client.SessionInfo);
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString());
     }
 }
예제 #2
0
        private void OnTcpComm_ConnectionClosed(object sender, ConnectionStateChangedEventArgs e)
        {
            try
            {
                this.ProcessSessionTerminated(e.Client.SessionId, "Tcp");
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
            }

            if (connectionType == ConnectionType.Client)
            {
                Task.Run(StartAutoReconnectAsync);
            }
        }