WebSocket TCP HTTP
RFC 6455 - The WebSocket Protocol https://tools.ietf.org/html/rfc6455
1.5. Design Philosophy
_This section is non-normative._ The WebSocket Protocol is designed on the principle that there should
be minimal framing (the only framing that exists is to make the
protocol frame-based instead of stream-based and to support a
distinction between Unicode text and binary frames). It is expected
that metadata would be layered on top of WebSocket by the application Fette & Melnikov Standards Track [Page 9]
RFC 6455 The WebSocket Protocol December 2011 layer, in the same way that metadata is layered on top of TCP by the
application layer (e.g., HTTP). Conceptually, WebSocket is really just a layer on top of TCP that
does the following: o adds a web origin-based security model for browsers o adds an addressing and protocol naming mechanism to support
multiple services on one port and multiple host names on one IP
address o layers a framing mechanism on top of TCP to get back to the IP
packet mechanism that TCP is built on, but without length limits o includes an additional closing handshake in-band that is designed
to work in the presence of proxies and other intermediaries Other than that, WebSocket adds nothing. Basically it is intended to
be as close to just exposing raw TCP to script as possible given the
constraints of the Web. It's also designed in such a way that its
servers can share a port with HTTP servers, by having its handshake
be a valid HTTP Upgrade request. One could conceptually use other
protocols to establish client-server messaging, but the intent of
WebSockets is to provide a relatively simple protocol that can
coexist with HTTP and deployed HTTP infrastructure (such as proxies)
and that is as close to TCP as is safe for use with such
infrastructure given security considerations, with targeted additions
to simplify usage and keep simple things simple (such as the addition
of message semantics). The protocol is intended to be extensible; future versions will
likely introduce additional concepts such as multiplexing.
https://github.com/HJava/myBlog
【译】WebSocket协议第一章——介绍(Introduction) - 掘金 https://juejin.im/post/5b1a7189e51d45068b496cf0
WebSocket TCP HTTP的更多相关文章
- Nginx 解决WebSocket TCP 转发问题
背景: IM 即时通讯时候 , 前期我用的是IP 没什么问题,当然上线肯定要搞个域名搞搞了! 那么问题来了------>Nginx 我按照原先那样配置时候不行了, 连接不了. 解决方法: ...
- Nginx 不支持WebSocket TCP
proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
- TCP连接建立与释放
tcp建立连接 tcp连接的建立需要经历”三次握手“的过程.过程如下 client发送SYN包(值为j)以及SEQ包到server端,此时client进入SYN_SEND状态.此为第一次握手. ser ...
- doubango简介
1.doubango官网:http://www.doubango.org/ doubango常用项目国内镜像(放在淘宝的svn服务器),目前有4个项目:doubango, idoubs, imsdro ...
- doubango介绍
1.doubango官网:http://www.doubango.org/ 2.doubango是一个开源的VOIP基础平台, 并能用于嵌入式和桌面系统的开源框架,该框架使用ANSCI-C编写,具有很 ...
- 【分享】2017 开源中国新增开源项目排行榜 TOP 100
2017 年开源中国社区新增开源项目排行榜 TOP 100 新鲜出炉! 这份榜单根据 2017 年开源中国社区新收录的开源项目的关注度和活跃度整理而来,这份最受关注的 100 款开源项目榜单在一定程度 ...
- Erlang cowboy 入门参考
Erlang cowboy 入门参考 cheungmine,2014-10-28 本文翻译自: http://ninenines.eu/docs/en/cowboy/HEAD/guide/gettin ...
- Istio究竟是干嘛的?
要聊ServiceMesh,就不得不提Istio,它是ServiceMesh目前最流行的实践, 当微服务架构体系越来越复杂的时候,需要将“业务服务”和“基础设施”解耦,将一个微服务进程一分为二: 一个 ...
- 使用 WebSockets 技术的 9 个应用场景
没有其他技术能够像WebSocket一样提供真正的双向通信,许多web开发者仍然是依赖于ajax的长轮询来实现.对Websocket缺少热情,也许是因为多年前他的安全性的脆弱,抑或者是缺少浏览器的支持 ...
随机推荐
- E-BOOK-TINY6410-LCD的使用
电子书需要通过屏幕显示出来,首先写了LCD模块.代码上传到了 github https://github.com/qq2216691777/E-book 本次完善了lcd模块的程序.可以适用在其他地方 ...
- VIM操作快捷键
i:插入光标前一个字符I:插入行首a:插入光标后一个字符A:插入行末o:向下新开一行,插入行首O:向上新开一行,插入行首M:光标移到中间行L:光标移动到屏幕最后一行行首G:移动到指定行{:按段移动,上 ...
- 虚拟机的安装and虚拟机中安装Linux操作系统
安装虚拟机并安装Linux系统,我们首先需要下载: (1)VMware安装包 (2)Linux 镜像iso 文件 下载VM安装包后准备安装虚拟机: 直接点击下一步 接受条款下一步 这里默认是c盘,建议 ...
- TurtleBot3 Waffle (tx2版华夫)(8)键盘控制
1)[Remote PC] 启动roscore $ roscore 2)[Turbot3] 启动turbot3 $ roslaunch turbot3_bringup minimal.launch 3 ...
- Eclipse导入外部jar包的步骤
(1)首先在项目的跟目录下先建一个名字为lib的文件夹,通常外部导入的jar包都放在这个文件夹下面. (2)将需要用到的jar包复制到lib文件夹下面. (3)在项目中导入jar包 右键项目,选择Bu ...
- java interface和class中的协变
协变 Java中的协变是指,当发生继承时,子类中重写父类的方法时,可以返回父类方法返回类型的子类型.比如: class SuperClass{} class SubClass extends Supe ...
- Spring源码深度解析之数据库连接JDBC
Spring源码深度解析之数据库连接JDBC JDBC(Java Data Base Connectivity,Java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供 ...
- tf.lin_space
.lin_spae{ start, stop, num, name=None } start:张量(float32,或者float64类型) stop:张量(和start相同) num:张量(int3 ...
- “==”和equals的区别
区别: (1)比较基本数据类型时 只能采用"==",比较的是数值; (2)当比较引用数据类型时 "==" 比较的是引用对象的内存地址; 而equals分两种情况 ...
- fatal error C1045: 编译器限制 : 链接规范嵌套太深
前言 我相信你是遇到了同样的问题.通过搜索引擎来到这里的.为了不耽误排查问题的时间,我提前说明一下这篇文章所描述的问题范畴: 我遇到的问题和 c++ 模板相关: 如果我减少传递的参数的话,是有可能避免 ...