<div dir="ltr"><div style="font-size:13px;font-family:Calibri,sans-serif">Hi,</div><div style="font-size:13px;font-family:Calibri,sans-serif"> </div><div style="font-size:13px;font-family:Calibri,sans-serif">I need to do a DNS resolution of a hostname to an IPv4 address in order to then send out a UDP packet via twisted’s APIs.  There appears to be 2 ways to do this.  Is it better to use twisted.names.client.getHostByName(), or is it better to use reactor.resolve()?  Is there a bias for one over the other?  Is one deprecated and the other isn’t?</div>
<div style="font-size:13px;font-family:Calibri,sans-serif"> </div><div style="font-size:13px;font-family:Calibri,sans-serif">BTW they appear to behave differently; at work, I have a hostname that the one (getHostByName) resolves to None in the callback, and the other (reactor.resolve) resolves to a valid IP address in the callback.  That analysis is based on twisted 12.3.0 on linux.  Naturally I'm preferring reactor.resolve at this point, as it works better for the hostname in question (it happens to be a hostname that uses a CNAME record to alias to another hostname).</div>
<div style="font-size:13px;font-family:Calibri,sans-serif"> </div><div style="font-size:13px;font-family:Calibri,sans-serif">Thanks,</div><br clear="all"><div><br></div>-- <br>Benjamin Rutt
</div>