// /** // * File: Program.cs // * Author: haraldwolff // * // * This file and it's content is copyrighted by the Author and / or copyright holder. // * Any use wihtout proper permission is illegal and may lead to legal actions. // * // * // **/ using System; using ln.radius; using System.Net; using System.Threading; using ln.logging; using System.Net.Sockets; using Newtonsoft.Json; using ln.dhcp; using ln.types.net; using ln.http; using ln.http.resources; using skyspot.http; namespace skyspot { class MainClass { public static void Main(string[] args) { DHCPServer dhcpServer = new DHCPServer(); //dhcpServer.EnsureInterface(IPv4.Parse("10.118.200.2")); //dhcpServer.EnsurePool("default", IPv4.Parse("10.118.200.50"), IPv4.Parse("10.118.200.99")); //foreach (DHCPServerInterface serverInterface in dhcpServer.Interfaces) //{ // if (serverInterface.Pool == null) // { // serverInterface.Pool = dhcpServer.IPPools[0]; // dhcpServer.Commit(serverInterface); // } //} dhcpServer.Start(); HTTPServer httpServer = new HTTPServer(); httpServer.AddEndpoint(new IPEndPoint(IPAddress.Any, 80)); ResourceApplication app = new SkySpotApplication(); httpServer.DefaultApplication = app; DHCP httpDHCP = new DHCP(null,dhcpServer); (app.RootResource as DirectoryResource).InjectResource(httpDHCP); httpServer.Start(); } } }