Ejemplo n.º 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!IsDisposed)
     {
         if (disposing)
         {
             Rsa?.Dispose();
             DhPrime?.Dispose();
             DhGenerator?.Dispose();
             DhPublic?.Dispose();
             DhPrivate?.Dispose();
         }
         IsDisposed = true;
     }
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
 }