[Twisted-Python] twisted.internet and IPv6

Valentino Volonghi dialtone at gmail.com
Thu Sep 30 05:24:20 EDT 2004

On Thu, 30 Sep 2004 10:12:18 +0200, Stefan Behnel
<behnel_ml at gkec.informatik.tu-darmstadt.de> wrote:
> Hi!
> I'm curious: how much work would it be to enable IPv6 support in twisted.internet?

> I get a number of references to IPv4 that make me believe that t.i.* is not quite IPv6 clean by itself:

> What would be needed? Would a new reactor be a good solution? "reactor6" ? Or rather extending the current one?
> I'd say a reactor6 would be cleaner, but on the other hand, a simple flag could do the trick from the API perspective.
> Any comments on this?

That a new reactor would solve nothing since the reactor is not the
responsible for connections. Connection.py and tcp.py are the modules
you are looking for (those that create the connection).

Also there's a problem if you only write a new reactor, that IPv6
couldn't be used in other reactors, which is bad :).

I'd rather hack on tcp.py and Connection.py and address.py (all in

Those sockets that you see in default.py are to wake up the main
thread under windows IIRC.

Since Twisted is very layered what happens at a lower level is
actually unknown to the upper layers. So yes, twisted is not yet ready
for IPv6, but implementing it won't brake anything (unless you use
IPv6 by default).

Maybe providing connectTCP6 could be a solution.

Valentino Volonghi aka Dialtone
Linux User #310274, Proud Gentoo User
Blog: http://vvolonghi.blogspot.com
Home Page: http://xoomer.virgilio.it/dialtone/

More information about the Twisted-Python mailing list