[Stackless] OS-X installer (was: Re: asyncore/chat or stackless for SMTP server?)

Christopher Armstrong radix at twistedmatrix.com
Sun Oct 22 19:04:49 CEST 2006

On 10/22/06, Santiago Gala <santiago.gala at gmail.com> wrote:
> Erlang has nothing like socket.getaddrinfo(), what I discovered painfully
> while trying to adapt ejabberd-mod-irc adapter to ipv6. The listening
> sockets can be make to work, by using ::1, but having sockets choose the
> best ipv4/ipv6 address when connecting is not trivial at all.
> So, if you need ipv6 compatibility, erlang might not be the best solution.
> While at that, how is people handling the intrinsic blocking nature of
> getaddrinfo() as the first step of dual ipv4/ipv6 client or server
> connections?

As for Twisted, it has two major options for this: either you can run it in
a threadpool (unfortunately the default, but for good reasons), or use
Twisted's native asynchronous DNS client. The reactor has a pluggable
resolver so once you've made the decision to use one of these strategies
it's transparent to the rest of your program. The reason that running
getaddrinfo in a threadpool is the default is that the native DNS client
doesn't support all of the pathological client-side configurations possible
that getaddrinfo does, so to use something other than the built-in
gethostbyname or getaddrinfo would mean your program can behave subtly or
completely differently with respect to name resolution.

Christopher Armstrong
International Man of Twistery
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20061022/66187173/attachment.htm>
-------------- next part --------------
Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list