void slpUser_ServiceFound(object sender, ServiceFoundEventArgs e) { foreach (UrlEntry url in e.Urls) { RdmEndPoint controlEndpoint = new RdmEndPoint(new IPEndPoint(e.Address.Address, RdmNetSocket.RdmNetPort), 0) { Id = UId.ParseUrl(url.Url) }; ControlEndpoints.Add(controlEndpoint); DiscoverEndpoints(controlEndpoint); } }
void dnsSD_ServiceAdded(object o, ServiceBrowseEventArgs args) { args.Service.Resolved += delegate(object sender, ServiceResolvedEventArgs e) { IResolvableService s = (IResolvableService)e.Service; foreach (IPAddress address in s.HostEntry.AddressList) { RdmEndPoint controlEndpoint = new RdmEndPoint(new IPEndPoint(address, RdmNetSocket.RdmNetPort), 0) { Id = UId.ParseUrl(s.TxtRecord["id"].ValueString) }; ControlEndpoints.Add(controlEndpoint); DiscoverEndpoints(controlEndpoint); } }; args.Service.Resolve(); }