Shutdown() public static méthode

public static Shutdown ( IChannel connection ) : void
connection IChannel
Résultat void
Exemple #1
0
 public void OnDisconnect(HeliosConnectionException cause, IConnection closedChannel)
 {
     _log.Debug("disconnected from {0}", closedChannel.RemoteHost);
     _fsm.Tell(PoisonPill.Instance);
     //TODO: Some logic here in JVM version to execute this on a different pool to the Netty IO pool
     RemoteConnection.Shutdown(closedChannel);
 }
Exemple #2
0
 protected override void PostStop()
 {
     try
     {
         RemoteConnection.Shutdown(_connection);
         RemoteConnection.ReleaseAll().Wait(_settings.ConnectTimeout);
     }
     catch (Exception ex)
     {
         _log.Error(ex, "Error while terminating RemoteConnection.");
     }
 }
Exemple #3
0
        public override void ChannelInactive(IChannelHandlerContext context)
        {
            if (!_loggedDisconnect) //added this to help mute log messages
            {
                _loggedDisconnect = true;
                _log.Debug("disconnected from {0}", context.Channel.RemoteAddress);
            }
            _fsm.Tell(PoisonPill.Instance);

            // run outside of the Helios / DotNetty threadpool
            Task.Factory.StartNew(() =>
            {
                RemoteConnection.Shutdown(context.Channel);
            }, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
            context.FireChannelInactive();
        }
 protected override void PostStop()
 {
     RemoteConnection.Shutdown(_connection);
 }