[Twisted-Python] Re: Using FQDN with transport.write calls...
Chaz.
eprparadocs at gmail.com
Sun Aug 13 14:38:04 MDT 2006
Jean-Paul Calderone wrote:
> On Sun, 13 Aug 2006 13:23:42 -0400, Chaz <eprparadocs at gmail.com> wrote:
>> Jean-Paul Calderone wrote:
>>> On Sun, 13 Aug 2006 07:28:51 -0400, "Chaz." <eprparadocs at gmail.com>
>>> wrote:
>>>> My application requires that I use FQDN in place of the normal IP
>>>> addresses in transport.write calls.
>>>
>>> No it doesn't. What behavior would you expect this to provide which you
>>> desire in your application?
>>>
>>> Jean-Paul
>>
>> I actually see reactor has a resolve() method that looks like it is
>> used. But in looking at the Posix implementation it appears to be
>> "blocking" (unless threading is around in which case it uses a thread).
>>
>> So I am now wondering the following:
>>
>> 1) Is the default resolve() method, blocking?
>> 2) How do I get it to use the thread version?
>>
>> Chaz
>>
>
> You didn't answer my question. Also, please don't top-post.
>
> Jean-Paul
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
Sorry for the top-post. What I want to do is the following
self.transport.write(data,('www.foobar.com',6000))
I think that says it succinctly.
As I see it I need to do some things with defer and reactor.resolve() or
use socket.getaddrinfo() or socket.gethostbyname() and deal with the
possible blocking nature of these calls.
As I said in my follow-on post I see the implementation of resolve() in
the posix reactor support and wonder about the two methods I see there:
the blocking one and the thread one. How do I get to decide which is used.
Finally is there some, unknown to me, way to already deal with this issue?
Peace,
Chaz.
More information about the Twisted-Python
mailing list