简体   繁体   English

websocket扩展位

[英]websocket extension bits

I'm writing a websocket server implementation in Python, and I'm a little lost on how extension negotiation works.我正在用 Python 编写一个 websocket 服务器实现,但我对扩展协商的工作方式有点迷茫。 There is of course the Sec-WebSocket-Extensions header available for the client to request extensions and for the server to allow / reject them.当然有 Sec-WebSocket-Extensions 标头可用于客户端请求扩展和服务器允许/拒绝它们。 It's the relationship of these extensions to the RSV1, RSV2, and RSV3 bits that somewhat confuses me.这些扩展与 RSV1、RSV2 和 RSV3 位的关系让我有些困惑。

The deflate-frame extension uses RSV1. deflate-frame 扩展使用 RSV1。 I know of no other extensions.我知道没有其他扩展。 If / when they are created, how will they map to RSV1, RSV2, and RSV3?如果/当它们被创建时,它们将如何映射到 RSV1、RSV2 和 RSV3? And why is this information transmitted with every WebSocket frame?为什么每个 WebSocket 帧都会传输此信息?

I've probably been negligent in not poring over the RFC with a magnifying glass, but I can't seem to find anything that explains this.我可能疏忽了没有用放大镜仔细研究 RFC,但我似乎找不到任何可以解释这一点的东西。

WebSocket extensions are specified in RFCs different from the WebSocket protocol itself (RFC6455). WebSocket 扩展在不同于 WebSocket 协议本身 (RFC6455) 的 RFC 中指定。

The WebSocket working group has "unadopted" the per-frame compression instead of per-message compression: WebSocket 工作组“未采用”每帧压缩而不是每消息压缩:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM