----- Original Message ----- > From: "Phil Mayers" <p.may...@imperial.ac.uk> > To: twisted-python@twistedmatrix.com > Sent: Monday, December 9, 2013 7:33:17 PM > Subject: Re: [Twisted-Python] Queries about connecting to a XML-RPC server > over IPv6 > > 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.
Thanks for your reply, Phil. So, I basically modified twisted/web/xmlrpc.py so that when it was calling connectTCP(), i substituted '::1' in place of self.host and yes the method is called successfully. I will consider your other hints and see if there is an easy way to work around this in my particular use case. Thanks, Amit. -- Amit Saha <http://echorand.me> _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python