/// <summary> /// Asks other MDNS services to send their service names; /// accepts unicast and/or broadcast answers. /// </summary> /// <remarks> /// When an answer is received the <see cref="ServiceDiscovered"/> event is raised. /// </remarks> public void QueryUnicastAllServices() { Mdns.SendUnicastQuery(ServiceName, type: DnsType.PTR); }
/// <summary> /// Asks instances of the specified service to send details. /// accepts unicast and/or broadcast answers. /// </summary> /// <param name="service"> /// The service name to query. Typically of the form "_<i>service</i>._tcp". /// </param> /// <remarks> /// When an answer is received the <see cref="ServiceInstanceDiscovered"/> event is raised. /// </remarks> /// <seealso cref="ServiceProfile.ServiceName"/> public void QueryUnicastServiceInstances(DomainName service) { Mdns.SendUnicastQuery(DomainName.Join(service, LocalDomain), type: DnsType.PTR); }
/// <summary> /// Asks instances of the specified service to send details. /// accepts unicast and/or broadcast answers. /// </summary> /// <param name="service"> /// The service name to query. Typically of the form "_<i>service</i>._tcp". /// </param> /// <remarks> /// When an answer is received the <see cref="ServiceInstanceDiscovered"/> event is raised. /// </remarks> /// <seealso cref="ServiceProfile.ServiceName"/> public void QueryUnicastServiceInstances(string service) { Mdns.SendUnicastQuery(service + ".local", type: DnsType.PTR); }