public MiniDNS(GTSServer p_GTSServer, IPAddress p_myIPAdress) { this.m_GTSServer = p_GTSServer; if (p_myIPAdress.AddressFamily != AddressFamily.InterNetwork) throw new NotImplementedException("Can only run with IPV4 adresses"); this.m_myIPAdress = p_myIPAdress; this.m_dnssocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); this.m_dnssocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 53); this.m_dnssocket.Bind(ipep); }
static void Main(string[] args) { Core.GTSServer server = new Core.GTSServer(false); server.Start(); Console.WriteLine("Exiting..."); }
public MiniHTTP(GTSServer p_GTSServer, IPAddress p_IPaddress) { this.m_IPAddress = p_IPaddress; this.m_miniHTTPServer = new MiniHTTPServer(this.m_IPAddress, 80, this); }