Exemple #1
0
        static void Main(string[] args)
        {
            try
            {
                SIPDispatcherDaemon daemon = new SIPDispatcherDaemon();

                if (args != null && args.Length == 1 && args[0].StartsWith("-c"))
                {
                    Console.WriteLine("SIP Dispatcher starting");

                    Thread daemonThread = new Thread(daemon.Start);
                    daemonThread.Start();

                    m_monitorUp.WaitOne();
                }
                else
                {
                    System.ServiceProcess.ServiceBase[] ServicesToRun;
                    ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service(daemon) };
                    System.ServiceProcess.ServiceBase.Run(ServicesToRun);
                }
            }
            catch (Exception excp)
            {
                Console.WriteLine("Exception Main. " + excp.Message);
            }
        }
        static void Main(string[] args)
        {
            try
            {
                SIPDispatcherDaemon daemon = new SIPDispatcherDaemon();

                if (args != null && args.Length == 1 && args[0].StartsWith("-c"))
                {
                    Console.WriteLine("SIP Dispatcher starting");

                    Thread daemonThread = new Thread(daemon.Start);
                    daemonThread.Start();

                    m_monitorUp.WaitOne();
                }
                else
                {
                    System.ServiceProcess.ServiceBase[] ServicesToRun;
                    ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service(daemon) };
                    System.ServiceProcess.ServiceBase.Run(ServicesToRun);
                }
            }
            catch (Exception excp)
            {
                Console.WriteLine("Exception Main. " + excp.Message);
            }
        }
		public Service(SIPDispatcherDaemon daemon)
		{
			this.CanShutdown = true;
			this.CanStop = true;

            m_daemon = daemon;
		}
Exemple #4
0
        public Service(SIPDispatcherDaemon daemon)
        {
            this.CanShutdown = true;
            this.CanStop     = true;

            m_daemon = daemon;
        }