Example #1
0
        public void Test1()
        {
            Config.InitializeEventLog();
            var configurations = DHCPServerConfigurationList.Read(Config.GetConfigurationPath());
            var config         = configurations.Single();
            var dhcpServer     = DHCPServer.FromConfig(config);

            dhcpServer.Start();
            Thread.Sleep(100000000);
        }
        private void Resurrect(object state)
        {
            lock (m_Lock)
            {
                if (!m_Disposed)
                {
                    try
                    {
                        m_Server = DHCPServer.FromConfig(m_Config);

                        m_Server.OnStatusChange += server_OnStatusChange;
                        m_Server.OnTrace        += server_OnTrace;
                        m_Server.Start();
                    }
                    catch (Exception)
                    {
                        CleanupAndRetry();
                    }
                }
            }
        }