开发者

Twisted dns client

I"m using twisted framework to do some async reverse DNS resolving. I want to be able to test it against number of nameservers.

As i thought from reading the API docs when i create a Resolver object like this:

nameservers = [('4.2.2.2', 53), ('4.2.2.3', 53)]

r = client.createResolver(s开发者_如何学运维ervers=nameservers)

It will query both nameservers, when in fact only one is used. What are my options except using a loop?


You need to use a loop, with separate resolvers.

In DNS multiple servers are there for redundancy, and queries are only sent to multiple servers if previously tried servers fail to answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜