Esempio n. 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);
     }
 }
Esempio n. 2
0
 public void Notify(DNSFrame frame, EndPoint client)
 {
     MySubscribers.ForEach(s => s.Updata(frame, client));
 }