예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!IsDisposed)
     {
         if (disposing)
         {
             Rsa?.Dispose();
             DhPrime?.Dispose();
             DhGenerator?.Dispose();
             DhPublic?.Dispose();
             DhPrivate?.Dispose();
         }
         IsDisposed = true;
     }
 }
예제 #2
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            OnStopping();
            UdpSocketManager.Dispose();
            _listenerChannel.CloseAsync().WaitEx();
            _listenerEventLoopGroup.ShutdownGracefullyAsync().WaitEx();
            _workerEventLoopGroup.ShutdownGracefullyAsync().WaitEx();
            Rsa.Dispose();
            OnStopped();
        }
예제 #3
0
 public void Dispose()
 {
     if (Aes != null)
     {
         Aes.Dispose();
     }
     if (Rsa != null)
     {
         Rsa.Dispose();
     }
     if (Hasher != null)
     {
         Hasher.Dispose();
     }
     if (Generator != null)
     {
         Generator.Dispose();
     }
 }
예제 #4
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            Configuration.Logger?.Information("Shutting down...");
            _disposed      = true;
            IsShuttingDown = true;
            OnStopping();

            UdpSocketManager.Dispose();
            ShutdownThreads();
            Rsa.Dispose();

            IsShuttingDown = false;
            IsRunning      = false;
            OnStopped();
        }
 public override void Dispose()
 {
     Rsa.Dispose();
 }