I&#39;m still new to the whole twisted way of doing things, but it sounds very sensible. :) <br><br>Could you suggest a class to start studying from ?<br><br>/tax<br><br><div class="gmail_quote">2009/10/22  <span dir="ltr">&lt;<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On 07:00 pm, <a href="mailto:jesper@taxboel.dk">jesper@taxboel.dk</a> wrote:<br>

&gt;Hi Jean-Paul,<br>
&gt;<br>
</div><div class="im">&gt;I guess my focus is right when it comes to redirecting clients.<br>
&gt;<br>
&gt;Im hooking into<br>
&gt;<br>
&gt;DNSDatagramProtocol.writeMessage(self, message, address):<br>
&gt;<br>
&gt;And I guess thats OK?<br>
<br>
</div>Depends what &quot;OK&quot; is supposed to mean.<br>
<div class="im">&gt;<br>
&gt;But when it comes to bogus domains, I guess i could use:<br>
&gt;<br>
&gt;DNSServerFactory.gotResolverError(self, failure, protocol, message,<br>
&gt;address):<br>
<br>
</div>I don&#39;t know why you should have to do that.<br>
<div class="im">&gt;My problem is now how I construct a redirect package and channel it<br>
&gt;back to<br>
&gt;the client.<br>
&gt;<br>
&gt;Do you think that is a sensible approach? -and do you hava a pointer on<br>
&gt;how<br>
&gt;to find the associated client.<br>
<br>
</div>It would probably be a lot easier and more robust to implement a<br>
completely new custom resolver that *wraps* an existing resolver, rather<br>
than trying to extend an existing resolver via a subclass.  This removes<br>
many irrelevant implementation details from consideration (such as<br>
writeMessage and gotResolverError) and gives you an obvious place to put<br>
your redirect logic - in an errback on the Deferred returned by one of<br>
the wrapped resolver&#39;s lookup/query methods.<br>
<div><div></div><div class="h5"><br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br>