[Twisted-Python] Queries about connecting to a XML-RPC server over IPv6
Phil Mayers
p.mayers at imperial.ac.uk
Mon Dec 9 02:33:17 MST 2013
On 09/12/13 05:28, Amit Saha wrote:
> proxy = Proxy('http://localhost6:8000')
> proxy.callRemote('my_proxy_method').addCallbacks(printValue, printError)
>
>
> When I run it, i get "No route to host: 101, Network is unreachable".
>
> However, 'curl -6 localhost:8000' succeeds. What could be going on here?
The IPv6 support in Twisted is very new - check your version even *has*
it - and it's still a work in progress. You might find that you can't do
this. I'd have to read the code to be sure and I don't have time right
now, but my guess is that t.w.xmlrpc isn't "getaddrinfo"-ised so won't
connect to IPv6 names.
If your version of Twisted supports it, you could probably work around
this by sub-classing Proxy and calling reactor.connectTCP('::1', 8000)
to attach the protocol yourself.
More information about the Twisted-Python
mailing list