Exemple #1
0
 public void Listen()
 {
     serverOn = true;
     while (serverOn)
     {
         var      buffer   = new byte[1024];
         EndPoint client   = new IPEndPoint(IPAddress.None, 53);
         var      count    = MainSocket.ReceiveFrom(buffer, ref client);
         var      dnsFrame = new DNSFrame(buffer, count);
         Notify(dnsFrame, client);
     }
 }
Exemple #2
0
 public void Notify(DNSFrame frame, EndPoint client)
 {
     MySubscribers.ForEach(s => s.Updata(frame, client));
 }