예제 #1
0
 public async Task TestLookupWithGoogle(string domain, DnsQueryType type)
 {
     using var client = new DnsUdpClient(new NullLogger <DnsUdpClient>(), IPAddress.Parse("8.8.8.8"));
     await client.RunQuery(domain, type);
 }
예제 #2
0
 public async Task TestLookupWithCloudFlare(string domain, DnsQueryType type)
 {
     using var client = new DnsUdpClient(new NullLogger <DnsUdpClient>(), IPAddress.Parse("1.1.1.1"));
     await client.RunQuery(domain, type, type == DnsQueryType.ANY?DnsResponseCode.NotImp : DnsResponseCode.NoError);
 }