客户端必须在它发送到服务器的所有帧中添加掩码(Mask)
5. Data Framing
5.1. Overview
In the WebSocket Protocol, data is transmitted using a sequence of
frames. To avoid confusing network intermediaries (such as
intercepting proxies) and for security reasons that are further
discussed in Section 10.3, a client MUST mask all frames that it
sends to the server (see Section 5.3 for further details). (Note
that masking is done whether or not the WebSocket Protocol is running
over TLS.) The server MUST close the connection upon receiving a
frame that is not masked. In this case, a server MAY send a Close
frame with a status code of 1002 (protocol error) as defined in
Section 7.4.1. A server MUST NOT mask any frames that it sends to
the client. A client MUST close a connection if it detects a masked
frame. In this case, it MAY use the status code 1002 (protocol
error) as defined in Section 7.4.1. (These rules might be relaxed in
a future specification.) The base framing protocol defines a frame type with an opcode, a
payload length, and designated locations for "Extension data" and
"Application data", which together define the "Payload data".
Certain bits and opcodes are reserved for future expansion of the
protocol. Fette & Melnikov Standards Track [Page 27]
RFC 6455 The WebSocket Protocol December 2011 A data frame MAY be transmitted by either the client or the server at
any time after opening handshake completion and before that endpoint
has sent a Close frame (Section 5.5.1).
RFC 6455 - The WebSocket Protocol https://tools.ietf.org/html/rfc6455#section-5.1
客户端必须在它发送到服务器的所有帧中添加掩码(Mask)的更多相关文章
- JMeter怎么在get URL请求、POST请求中添加动态参数用于服务器段安全验证
从前一个页面(含有服务器段返回给客户端的参数,用于在下一次请求时验证)中添加后置处理器中的Regular Expression Extractor,使用正则表达式对参数进行提取. 在用到这些变量时可以 ...
- Spring Boot+Socket实现与html页面的长连接,客户端给服务器端发消息,服务器给客户端轮询发送消息,附案例源码
功能介绍 客户端给所有在线用户发送消息 客户端给指定在线用户发送消息 服务器给客户端发送消息(轮询方式) 项目搭建 项目结构图 pom.xml <?xml version="1.0&q ...
- cookie是如何保存到客户端,又是如何发送到服务端
Cookie相关的Http头 有 两个Http头部和Cookie有关:Set-Cookie和Cookie. Set-Cookie由服务器发送,它包含在响应请求的头部中.它用于在客户端创 ...
- 聊天室(C++客户端+Pyhton服务器)3.群功能添加
创建群 数据库 group_table(user, name) grpuser_table(grpname,user) 按下添加群按钮 // 创建群组void CUserDialog::OnBnCli ...
- 聊天室(C++客户端+Pyhton服务器)2.基本功能添加
根据之前的框架添加新的功能 登录 点击相关按钮 // 登录按钮的响应void CMainDialog::OnBnClickedLogin(){ // 1. 获取用户输入的数据 UpdateData(T ...
- Android客户端OkHttp的使用以及tomcat服务器的解析客户端发过来的数据
2020-02-15 21:25:42 ### android客户端客户向服务器发送json字符串或者以参数请求的方式发送数据 其中又分为post请求和get请求 1.activity.xml < ...
- Java基础知识强化之网络编程笔记09:TCP之客户端键盘录入服务器写到文本文件中
1. TCP之客户端键盘录入服务器写到文本文件中 (1)客户端: package cn.itcast_09; import java.io.BufferedReader; import java.io ...
- angular2^ typescript 将 文件和Json数据 合并发送到服务器(2.服务端)
nodejs 中使用框架 express web框架 multer 文件接受 直接贴代码了,我就不解释了 "use strict"; exports.__esModule = tr ...
- TCP连接建立系列 — 客户端接收SYNACK和发送ACK
主要内容:客户端接收SYNACK.发送ACK,完成连接的建立. 内核版本:3.15.2 我的博客:http://blog.csdn.net/zhangskd 接收入口 tcp_v4_rcv |--&g ...
随机推荐
- $emit的用法
自定义事件$emit.使用$emit建立父子组件之间的通信.子组件到父组件之间的通信. 子组件: 父组件:
- java中游标
package YouBiao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.Resu ...
- Arduino IDE 开发ESP-01/ESP8266-01读取DHT11温度湿度传感器
引脚接线: DHT11---ESP8266-01 Singnal--IO2, GND----GND, VCC----VCC DHT11引脚说明: ESP8266-01/ESP8266-01S引脚说明: ...
- 当layui与分页相遇--bootstrap何去何从
用了一段时间,感觉layui比bootstrap 方便了很多.在js操作上比bootstrap减少了许多的代码量. 今天遇到需要前台分页.当然,不是表格,如果是表格的话.使用yalui table和b ...
- 零基础学习python
一.python的注释方式: (1)python的单行注释: ctrl+/ # print('Hello World!') 这是当行注释 (2)python的多行注释: ''' ''' ' ' ' ...
- Inno Step软件安装包制作教程
Inno setup制作软件安装包教程 1,Inno Setup介绍 Inno Setup 是一个免费的安装制作软件,小巧.简便.精美是其最大特点,支持pascal脚本,能快速制作出标准Windows ...
- [学习笔记]尝试go-micro开发微服务<第一波>
平时项目都是基于c++,lua,node, 现在打算开始自学开发微服务; 也顺带磨砺下go和docker 前期准备 1. 有golang编程基础 本系列文章是基于有golang编程基础,有过实际开 ...
- Redis性能篇(二)CPU核和NUMA架构的影响
Redis被广泛使用的一个很重要的原因是它的高性能.因此我们必要要重视所有可能影响Redis性能的因素.机制以及应对方案.影响Redis性能的五大方面的潜在因素,分别是: Redis内部的阻塞式操作 ...
- 《Go 语言并发之道》读后感 - 第一章
<Go 语言并发之道>读后感 - 第一章 前言 人生路漫漫,总有一本书帮助你在某条道路上打通任督二脉,<Go 语言并发之道>就是我作为一个 Gopher 道路上的一本打通任督二 ...
- 日常ie兼容问题(持续整理)
1.关于new Date()格式为何要转成y/m/d格式 IE不会识别时间状态为"y-m-d"的形式,如果获取的new Date("2020-05-01") 那 ...