Esempio n. 1
0
        /// <summary>
        /// Event handler when a DNS-SD service is found
        /// Service information such as state, name, type, port, IP address are delivered
        /// </summary>
        /// <param name="s">Event sender</param>
        /// <param name="e">Event argument</param>
        private void EventHandlerDnssdServiceFound(object s, DnssdServiceFoundEventArgs e)
        {
            // Create a new DnssdDiscoveryEventArgs to deliver the event to application
            var service = new DnssdService(e.Service.Name, e.Service.Type, e.Service.Port, e.Service.IP.IPv4Address, e.Service.IP.IPv6Address);
            DnssdDiscoveryEventArgs de = new DnssdDiscoveryEventArgs(service);

            // Deliver the event to application
            DnssdServiceFound(s, de);
        }
Esempio n. 2
0
 /// <summary>
 /// Event argument that contains the found service information
 /// </summary>
 /// <param name="service"> Service data </param>
 public DnssdDiscoveryEventArgs(DnssdService service)
 {
     this.service = service;
 }