收藏官网首页
查看: 8516|回复: 0

[分享] WebSocket 和SSE,XHR的联系与区别

13

主题

14

帖子

138

积分

注册会员

Rank: 2

积分
138
发表于 2017-2-8 18:25:32 | 显示全部楼层 |阅读模式
免费使用STM32、APP自动代码生成工具


XHR is optimized for "transactional" request-response communication: the client sends the full, well-formed HTTP request to the server, and the server responds with a full response. There is no support for request streaming, and until the Streams API is available, no reliable cross-browser response streaming API.
SSE enables efficient, low-latency server-to-client streaming of text-based data: the client initiates the SSE connection, and the server uses the event source protocol to stream updates to the client. The client can’t send any data to the server after the initial handshake.
a5e56b619d4efca96ca8d8bf11bf81b4_b.png
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

加入Q群 返回顶部

版权与免责声明 © 2006-2024 Gizwits IoT Technology Co., Ltd. ( 粤ICP备11090211号 )

快速回复 返回顶部 返回列表