[Twisted-Python] Handeling unresolved DNS queries?
jesper at taxboel.dk
Thu Oct 22 16:55:05 EDT 2009
I'm still new to the whole twisted way of doing things, but it sounds very
Could you suggest a class to start studying from ?
2009/10/22 <exarkun at twistedmatrix.com>
> On 07:00 pm, jesper at taxboel.dk wrote:
> >Hi Jean-Paul,
> >I guess my focus is right when it comes to redirecting clients.
> >Im hooking into
> >DNSDatagramProtocol.writeMessage(self, message, address):
> >And I guess thats OK?
> Depends what "OK" is supposed to mean.
> >But when it comes to bogus domains, I guess i could use:
> >DNSServerFactory.gotResolverError(self, failure, protocol, message,
> I don't know why you should have to do that.
> >My problem is now how I construct a redirect package and channel it
> >back to
> >the client.
> >Do you think that is a sensible approach? -and do you hava a pointer on
> >to find the associated client.
> It would probably be a lot easier and more robust to implement a
> completely new custom resolver that *wraps* an existing resolver, rather
> than trying to extend an existing resolver via a subclass. This removes
> many irrelevant implementation details from consideration (such as
> writeMessage and gotResolverError) and gives you an obvious place to put
> your redirect logic - in an errback on the Deferred returned by one of
> the wrapped resolver's lookup/query methods.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python