擅长:python、mysql、java
<p>虽然设置起来有点复杂(但可能是方法),但是可以使用gunicorn+gevent+socket.io。</p>
<p>我用<a href="http://curella.org/blog/django-push-using-server-sent-events-and-websocket/" rel="noreferrer">this article</a>来引导我通过它。</p>
<p>您还可以查看服务器发送的事件(上面提到的文章也会查看)。如果它们适合您的需要,那么设置起来就容易一些,因为您不必设置socket.io,也不需要客户机库。不过,IE中不支持一个catch-SSE</p>