gpt4 book ai didi

WebSocket - 有效负载长度

转载 作者:行者123 更新时间:2023-12-02 22:27:14 25 4
gpt4 key购买 nike

WebSocket RFC 在描述有效负载长度时在[数据帧部分] ( https://www.rfc-editor.org/rfc/rfc6455#section-5.2 ) 中声明了以下内容:

If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length.

我有两个问题:

  1. 最高有效位必须为 0 有什么特殊原因吗?
  2. 这是否会使单帧的最大大小达到 9223372036854775807 字节?

最佳答案

  1. MSB 保存掩码位。如果设置了该位,则有效负载将使用以下掩码 key 进行掩码。长度字段只有 7 位长。
  2. 最大帧大小正确

关于WebSocket - 有效负载长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36095732/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com