Ticket #5085 enhancement closed fixed
Accept IPv6 address literals (with embedded scope ids) in IReactorTCP.connectTCP
|Reported by:||exarkun||Owned by:||glyph|
(diff, github, buildbot, log)
Description (last modified by thijs) (diff)
Similarly to #5084, Twisted should provide low-level support for IPv6 TCP clients. IReactorTCP.connectTCP implementations should accept IPv6 address literals and attempt to establish a connection to that IPv6 address.
All of the IPv4 features of connectTCP will remain the same. Passing an IPv4 address literal or a hostname will still attempt a connection to an IPv4 address.
The IConnector returned will return an IPv6Address (see #5084) from its getDestination method.
When a connection attempt is successful, the factory's buildProtocol method will be invoked with an IPv6Address instance giving the server's address.
The protocol will be connected to an ITCPTransport implementation which also returns IPv6Address instances from its getHost and getPeer implementations.
Once this is resolved, Twisted clients should be able to establish outgoing TCP connections to IPv6 addresses, eg ::1 or fe80::1%lo0 or 2001:6b0:e:2018::172%en3. Note that where the platform requires the scope id, connectTCP will require the scope id.