Shutdown() public static method

public static Shutdown ( IChannel connection ) : void
connection IChannel
return void
Exemplo n.º 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);
 }
Exemplo n.º 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.");
     }
 }
Exemplo n.º 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();
        }
Exemplo n.º 4
0
 protected override void PostStop()
 {
     RemoteConnection.Shutdown(_connection);
 }