WebSockets 版本之间的协议差异是什么? [英] What are the protocol differences between WebSockets versions?

查看:73
本文介绍了WebSockets 版本之间的协议差异是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有关于各种 WebSockets 草案之间协议差异的总结?

Is there a summary anywhere of the protocol difference between the various WebSockets drafts?

浏览器的支持级别仍然无处不在,因此仅考虑 RFC 是不够的.

The browser support levels are still all over the place, so it is not sufficient just to consider the RFC.

显然 Sec-WebSocket-Version 发生了变化,我知道早期的格式完全不同.然而,我的意思是协议中更微妙的变化.例如,hybi-10 (v8) 在成帧中建议扩展的有效载荷长度存储为 16/63,而不是 RFC 6455 (v13) 中的 16/64.

Obviously the Sec-WebSocket-Version changes, and I know the early format was pretty radically different. However, I mean the more subtle changes in the protocol. For example, hybi-10 (v8), in framing, suggests the extended payload length is stored as 16/63, rather than 16/64 in RFC 6455 (v13).

那么:是否有任何地方的更改摘要?

So: is there a summary of changes anywhere?

或者(如果我们忽略非常早期的草案和版本号),是否协议本质上是相同的,并且草案主要是对规范文本的更正?

Alternatively (if we ignore the very early drafts, and the version numbers), is it the case that the protocol is essentially the same, and that the drafts are mainly corrections to the specification text?

推荐答案

维基百科 WebSocket 列表哪些浏览器支持哪些协议.

The Wikipedia WebSocket lists which browsers support which protocol.

此外,IETF 提供了一个差异工具,可用于比较任何两个 RFC 草案规范.例如,要比较 WebSocket 草案 15 和 17,请访问此处:

Also, the IETF provides an diff tool that can be used to compare any two RFC draft specifications. For example, to compare WebSocket draft 15 and 17 go here:

调整 url1 和 url2 地址以获得任意版本的差异.请注意,这将向您显示规范的文本差异,并且规范的大量更改经常发生而在线路上没有相应的差异.我建议搜索Protocol Overview"部分和Base Framing Protocol"部分的差异,它们分别显示标题摘要和框架图.

Adjust the url1 and url2 addresses to get a diff for arbitrary versions. Note that this will shows you textual differences to the spec and large changes to the spec often happen without corresponding differences on the wire. I suggest searching the diffs for the "Protocol Overview" section and the "Base Framing Protocol" section which show the header summary and the framing diagram respectively.

有线协议的最大差异发生在 Hixie-76/HyBi-00(HyBi-00 只是 Hixie-76 的副本,用于启动新系列)和其余的 HyBi 系列(以 HyBi-04 开始)之间(HyBi-17 成为 IETF RFC 6455).从 Hixie 系列到 HyBi 系列的一些主要变化:

The biggest difference in the wire protocol occured between Hixie-76/HyBi-00 (HyBi-00 was just a copy of Hixie-76 for starting the new series) and the rest of the HyBi series starting with HyBi-04 (HyBi-17 became IETF RFC 6455). Some of the major changes from the Hixie series to the HyBi series:

  • 在 Hixie-76 协议中,有一个特殊的哈希握手发生在握手标头之后但在实际数据帧之前.
  • 在 Hixie-76 中,帧的前缀为 0x00,后缀为 0xff.没有办法确定帧的长度,除非通过接收/缓冲一直到帧的结尾.在 HyBi 系列中(在 HyBi-00 之后),帧长度是前缀/报头的一部分,没有后缀.
  • HyBi 系列在有效载荷中同时支持 UTF-8 文本和二进制数据(Hixie 仅支持 UTF-8).这由帧头中的和操作码指示.

这篇关于WebSockets 版本之间的协议差异是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆