I use https://github.com/mrjoes/sockjs-tornado
for a Django app. I can send messages from javascript console very easy. But I want to create a signal in Django and send json string once the signal is active.
Could anyone give me a way to send a certain message in Python to sockjs-tornado socket server?
There are few options how to handle it:
In most of the cases, it is either first or second option. Some people prefer using 3rd option though.
I've wrote djazator , simple and easy to use django plugin. It uses zeromq for delivering messages from django to sockjs-tornado. Additionally, it can send messages to subset of authenticated django users.
我只是把它放在https://github.com/amagee/sockjs-client上,用于直接与Python的SockJS服务器通信(使用xhr流)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.