示例#1
0
        /// <summary>
        ///   Asks instances of the specified service with the subtype to send details.
        /// </summary>
        /// <param name="service">
        ///   The service name to query. Typically of the form "_<i>service</i>._tcp".
        /// </param>
        /// <param name="subtype">
        ///   The feature that is needed.
        /// </param>
        /// <remarks>
        ///   When an answer is received the <see cref="ServiceInstanceDiscovered"/> event is raised.
        /// </remarks>
        /// <seealso cref="ServiceProfile.ServiceName"/>
        public void QueryServiceInstances(DomainName service, string subtype)
        {
            var name = DomainName.Join(
                new DomainName(subtype),
                SubName,
                service,
                LocalDomain);

            Mdns.SendQuery(name, type: DnsType.PTR);
        }
示例#2
0
 /// <summary>
 ///    Asks other MDNS services to send their service names.
 /// </summary>
 /// <remarks>
 ///   When an answer is received the <see cref="ServiceDiscovered"/> event is raised.
 /// </remarks>
 public void QueryAllServices()
 {
     Mdns.SendQuery(ServiceName, type: DnsType.PTR);
 }
示例#3
0
 /// <summary>
 ///   Asks instances of the specified service to send details.
 /// </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 QueryServiceInstances(DomainName service)
 {
     Mdns.SendQuery(DomainName.Join(service, LocalDomain), type: DnsType.PTR);
 }
示例#4
0
 /// <summary>
 ///   Asks instances of the specified service to send details.
 /// </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 QueryServiceInstances(string service)
 {
     Mdns.SendQuery(service + ".local", type: DnsType.PTR);
 }