Akka.Remote.TestKit.RemoteConnection.Shutdown C# (CSharp) Метод

Shutdown() публичный статический Метод

public static Shutdown ( IChannel connection ) : void
connection IChannel
Результат void
        public static void Shutdown(IChannel connection)
        {
            var disconnectTimeout = TimeSpan.FromSeconds(2); //todo: make into setting loaded from HOCON
            if (!connection.CloseAsync().Wait(disconnectTimeout))
            {
                LoggingFactory.GetLogger<RemoteConnection>().Warning("Failed to shutdown remote connection within {0}", disconnectTimeout);
            }
            
        }

Usage Example

Пример #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);
 }
All Usage Examples Of Akka.Remote.TestKit.RemoteConnection::Shutdown