简体   繁体   中英

Can Dns.GetHostEntryAsync method avoid searching FQDNs for IPV6 machines and be limited to IPV4 servers only

I am using an application to get the FQDNs for a list of servers based on their hostname. There seems to a bottleneck to the solution, the FQDN search requires IPV4 address only as there are no IPV6 machines used across the network. The additional lookup of IPV6 are taking more time to find the host FQDNs which delays the execution time as a whole. Can the IPV6 serach be avoided using Dns.GetHostEntryAsync method?

I'm not sure this is supported.

You can use ARSoft.Tools.Net library for better DNS powers. I've used this in some very demanding situations. It works (and is really asynchronous, unlike .NET's DNS , which isn't really asynchronous ).

For instance:

var answer =  await DnsClient.Default
                 .ResolveAsync(DomainName.Parse("www.google.com"), RecordType.A);
var addresses = answer.AnswerRecords
                      .OfType<IAddressRecord>()
                      .Select(r => r.Address);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM