Inheritance: DnsServer
 public void Resolve(string protocol, params IPEndPoint[] endpoints)
 {
     if (!protocol.EndsWith("."))
     {
         if (protocol.EndsWith(".local"))
         {
             protocol += ".";
         }
         else
         {
             protocol += ".local.";
         }
     }
     else
     {
         if (!protocol.EndsWith("local."))
         {
             protocol += "local.";
         }
     }
     protocols.Add(protocol);
     if (client == null)
     {
         client = new MDnsServer(endpoints);
         client.AnswerReceived += client_AnswerReceived;
         client.Resolve(protocol);
     }
     else
     {
         client.Resolve(protocol);
     }
 }
示例#2
0
 public void Publish()
 {
     publisher = new MDnsServer();
     publisher.QueryReceived += publisher_QueryReceived;
     publisher.StartUdp();
     Renew(500);
 }
示例#3
0
        public void Resolve()
        {
            if (resolver != null)
                resolver.Stop();

            if (HostName == null)
            {
                needsToBeResolvedLater = true;
                return;
            }
            needsToBeResolvedLater = false;
            resolver = new MDnsServer().Resolve(HostName);
            resolver.AnswerReceived += client_AnswerReceived;
            resolver.StartUdp();
            resolved.WaitOne();
        }
示例#4
0
        public void Resolve()
        {
            if (resolver != null)
            {
                resolver.Stop();
            }

            if (HostName == null)
            {
                needsToBeResolvedLater = true;
                return;
            }
            needsToBeResolvedLater = false;
            resolver = new MDnsServer().Resolve(HostName);
            resolver.AnswerReceived += client_AnswerReceived;
            resolver.StartUdp();
            resolved.WaitOne();
        }
 public void Resolve(string protocol)
 {
     if (!protocol.EndsWith("."))
     {
         if (protocol.EndsWith(".local"))
             protocol += ".";
         else
             protocol += ".local.";
     }
     else
     {
         if (!protocol.EndsWith("local."))
             protocol += "local.";
     }
     protocols.Add(protocol);
     if (client == null)
     {
         client = new MDnsServer();
         client.AnswerReceived += client_AnswerReceived;
         client.Resolve(protocol);
     }
     else
         client.Resolve(protocol);
 }
示例#6
0
 public void Publish()
 {
     publisher = new MDnsServer();
     publisher.QueryReceived += publisher_QueryReceived;
     publisher.StartUdp();
     Renew(500);
 }