问题:
Both WebSockets and Server-Sent Events are capable of pushing data to browsers. WebSockets和服务器发送事件都能够将数据推送到浏览器。 To me they seem to be competing technologies. 在我看来,它们似乎是竞争技术。 What is the difference between them? 它们之间有什么区别? When would you choose one over the other? 您何时会选择一个?
解决方案:
参考一: https://stackoom.com/question/LnZc/WebSockets与服务器发送的事件-EventSource参考二: https://oldbug.net/q/LnZc/WebSockets-vs-Server-Sent-events-EventSource
来源:oschina
链接:https://my.oschina.net/stackoom/blog/4328876