[Twisted-Python] Question about XMLRPC, Sync and ASync

Colin Fox greenenergy at gmail.com
Fri Aug 6 12:02:33 MDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone.

I'm relatively new to Twisted, though I have used parts of it for a while.

What I'm trying to do now has me a little stumped -- I have two servers,
one of which answers XMLRPC requests, and it calls another one using the
twisted basic.LineReceiver system.

So I have an incoming XMLRPC request, and I need to issue a command to
the other server and wait for it to come back before I respond to the
xmlrpc call. So I'm trying to do an async call inside a synchronous call.

I think that deferreds will play a part here, but I guess I must be
missing something, as I'm not sure how to proceed. Can I return a
deferred from my XMLRPC handler? And if so, how do I fire the callback
when the result comes in to the LineReceiver?

Thanks,
   Colin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMXE45AAoJEKVzdTf0DlfQ+vIH/RJFfIlVfUAkNXFER12eoY7E
TgtXYP4nLBMsBbaPUy7LROrfCl2gdxPdy/q2DI7JHueG2eUznW5IdG4Zipe6RFS/
xCAUebs7E2Cdkc0s+i+6zCvCZQvmUV20tunxyheuwc26PxPT0HEZGpGJhhKOGqGL
tYGr3OXAn7CEiAxwX3XMs4nMRVLAalMnKgsDLIRx4jZkaitvAQb/ufuJWmzf2+u2
dgbPREllAze3LrGsPFjCUdJToAE3AVzYIMbGQr/n/TsUK3v+hbAky2Xu8xuAkUgF
4y/5THaPw2EFKJsZNFhSY7b6hHbO+gr0VzRkx92sPKy4GxnxY7Br80n6A76LBoc=
=mRxr
-----END PGP SIGNATURE-----




More information about the Twisted-Python mailing list