Beispiel #1
0
        private static void Cleanup()
        {
            Logger.WARN("Shutting down protocols manager");
            ProtocolManager.Shutdown();
            ProtocolManager.CleanupDeadProtocols();

            Logger.WARN("Shutting down I/O handlers manager");
            IOHandlerManager.ShutdownIOHandlers();
            IOHandlerManager.DeleteDeadHandlers();
            IOHandlerManager.Shutdown();

            Logger.WARN("Unregister and delete default protocol handler");
            ProtocolFactoryManager.UnRegisterProtocolFactory(_protocolFactory);

            Logger.WARN("Shutting down applications");
            ClientApplicationManager.Shutdown();

            Logger.WARN("Delete the configuration");

            _configFile = null;

            //Logger.WARN("Doing final OpenSSL cleanup");
            //CleanupSSL();

            Logger.WARN("Shutting down the logger leaving you in the dark. Bye bye... :(");
            Console.ReadKey();
        }
Beispiel #2
0
        public static void Run()
        {
            Logger.INFO("\n{0}", _configFile.GetServicesInfo());
            Logger.INFO("GO! GO! GO! ({0})", Process.GetCurrentProcess().Id);
            IOHandlerManager.Stopwatch.Start();
            //new Action(ProtocolManager.Manage).BeginInvoke(null,null);
            while (IOHandlerManager.Pulse())
            {
                // IOHandlerManager.DeleteDeadHandlers();
                ProtocolManager.CleanupDeadProtocols();
                Thread.Sleep(100);
                //ProtocolManager.Manage();
            }

            IOHandlerManager.Stopwatch.Stop();
        }
 protected void Disconnect(BaseProtocol protocol)
 {
     protocol.EnqueueForDelete();
     ProtocolManager.CleanupDeadProtocols();
 }