Tornado websockets: share open web sockets between processes
I have tornado application, that serves websockets connections, and Django app. I want to share open websockets between Django and Tornado (i.e. write to sockets开发者_StackOverflow from Django application). What is the easiest way to achieve this?
Easiest way to do it is to use a tornado.wsgi.WSGIContainer wrapping a django.core.handlers.wsgi.WSGIHandler. There is a good example at http://djangosnippets.org/snippets/1748/.
精彩评论