On Tue, Oct 6, 2009 at 11:30 PM, Stephen Mattison <[email protected] > wrote:
> How can I implement this in Twisted? > You can use DeferredResource: http://twistedmatrix.com/documents/8.2.0/api/twisted.web.util.DeferredResource.html or you can return NOT_DONE_YET from Resource.render(), and hold on to the request: http://twistedmatrix.com/documents/8.2.0/api/twisted.web.resource.Resource.html#render to leave the connection open until something happens. For a more elaborate example of a long-polling server component, you could see Nevow's Athena: http://www.divmod.org/trac/wiki/DivmodNevow/Athena This does not implement JSON-RPC or XML-RPC, but it has lots of code for managing the outstanding connection, which may give you some ideas. -Glyph
_______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
