示例#1
0
 public DnsServer(IQuestionAnswerer questionAnswerer, IPEndPoint endServer = null)
 {
     this.emitter = new EventEmitter();
     if (endServer != null)
     {
         this.client = new DnsClient(endServer, new UdpRequestResolver());
     }
     this.questionAnswerer = questionAnswerer;
 }
示例#2
0
 public DnsServer(IQuestionAnswerer questionAnswerer, string endServerIp, int port = DEFAULT_PORT) : this(questionAnswerer, IPAddress.Parse(endServerIp), port)
 {
 }
示例#3
0
 public DnsServer(IQuestionAnswerer questionAnswerer, IPAddress endServer, int port = DEFAULT_PORT) : this(questionAnswerer, new IPEndPoint(endServer, port))
 {
 }