public DnsServer(Configer config) { this.emitter = new EventEmitter(); this.globalClient = new DnsClient(new IPEndPoint(IPAddress.Parse(config.GlobalDnsServer), 53), new UdpRequestResolver()); this.ispClient = new DnsClient(new IPEndPoint(IPAddress.Parse(config.IspDnsServer), 53), new UdpRequestResolver()); this.masterFile = new MasterFile(); }
public DnsServer(IQuestionAnswerer questionAnswerer, IPEndPoint endServer = null) { this.emitter = new EventEmitter(); if (endServer != null) { this.client = new DnsClient(endServer, new UdpRequestResolver()); } this.questionAnswerer = questionAnswerer; }
public DnsServer(IPEndPoint endServer) { this.emitter = new EventEmitter(); this.client = new DnsClient(endServer, new UdpRequestResolver()); this.masterFile = new MasterFile(); }