Websocket协议延续框架

7 specifications protocols websocket

我正在尝试理解websocket协议http://tools.ietf.org/html/rfc6455

但不明白延续框架是什么.如果我正在创建一个websocket客户端,我什么时候会期望服务器发送它?我什么时候想发送它?上面的参考文献几乎没有关于延续框架是什么或做什么的信息,或者客户端(或服务器)应该如何处理它.从协议规范:

操作码:4位

  Defines the interpretation of the "Payload data".  If an unknown
  opcode is received, the receiving endpoint MUST _Fail the
  WebSocket Connection_.  The following values are defined.

  *  %x0 denotes a continuation frame
Run Code Online (Sandbox Code Playgroud)

这是继续框架的三个参考之一,并没有给我很多东西继续.

我应该忽略这个操作码的任何帧吗?

obe*_*tet 6

不,你不能忽视延续帧.如果不实现它们,则WebSocket实现将不符合RFC6455.延续帧用于分段的 WebSocket消息.除第一帧之外的所有帧都称为连续帧.除了第一个和最后一个之外的所有都称为非最终连续帧.