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的更多相关文章

  1. Nginx 解决WebSocket TCP 转发问题

    背景:   IM 即时通讯时候  , 前期我用的是IP 没什么问题,当然上线肯定要搞个域名搞搞了! 那么问题来了------>Nginx  我按照原先那样配置时候不行了, 连接不了. 解决方法: ...

  2. Nginx 不支持WebSocket TCP

    proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";

  3. TCP连接建立与释放

    tcp建立连接 tcp连接的建立需要经历”三次握手“的过程.过程如下 client发送SYN包(值为j)以及SEQ包到server端,此时client进入SYN_SEND状态.此为第一次握手. ser ...

  4. doubango简介

    1.doubango官网:http://www.doubango.org/ doubango常用项目国内镜像(放在淘宝的svn服务器),目前有4个项目:doubango, idoubs, imsdro ...

  5. doubango介绍

    1.doubango官网:http://www.doubango.org/ 2.doubango是一个开源的VOIP基础平台, 并能用于嵌入式和桌面系统的开源框架,该框架使用ANSCI-C编写,具有很 ...

  6. 【分享】2017 开源中国新增开源项目排行榜 TOP 100

    2017 年开源中国社区新增开源项目排行榜 TOP 100 新鲜出炉! 这份榜单根据 2017 年开源中国社区新收录的开源项目的关注度和活跃度整理而来,这份最受关注的 100 款开源项目榜单在一定程度 ...

  7. Erlang cowboy 入门参考

    Erlang cowboy 入门参考 cheungmine,2014-10-28 本文翻译自: http://ninenines.eu/docs/en/cowboy/HEAD/guide/gettin ...

  8. Istio究竟是干嘛的?

    要聊ServiceMesh,就不得不提Istio,它是ServiceMesh目前最流行的实践, 当微服务架构体系越来越复杂的时候,需要将“业务服务”和“基础设施”解耦,将一个微服务进程一分为二: 一个 ...

  9. 使用 WebSockets 技术的 9 个应用场景

    没有其他技术能够像WebSocket一样提供真正的双向通信,许多web开发者仍然是依赖于ajax的长轮询来实现.对Websocket缺少热情,也许是因为多年前他的安全性的脆弱,抑或者是缺少浏览器的支持 ...

随机推荐

  1. Blogs实现侧边公告栏设置

    说明:只需要在博客侧边栏公告(支持HTML代码) (支持 JS 代码)里面添加如下代码 #1.博客运行时长统计 <!--博客运行时长显示开始--!> <div id="sh ...

  2. Apache Cassandra——可扩展微服务应用程序的持久数据存储

    通过使用微服务,团队可以更快地响应变化,而无需改动整个应用程序.利用微服务,开发团队可以构建出具有鲁棒性和可扩展性的系统,从而适应当今应用程序的需求.   然而,使用微服务也带来了一系列挑战.在本文中 ...

  3. java的注释方法

    1.单行注释 //注释的内容 2.多行注释 /....../ 3./**......*/,这种方式和第二种方式相似.这种格式是为了便于javadoc程序自动生成文档.

  4. JDBC学习(错误反思)

    注意拼写错误!!! 注意拼写错误!!! 注意拼写错误!!!  文档注释快捷键   alt+shift+J    

  5. 通过naa在esxi主机上找到物理磁盘的位置

    因为有一块磁盘告警,需要找到这个块磁盘.通过网络搜索就找到了这个shell脚本. 感谢 Jorluis Perales, VxRail TSE 2 shell脚本: # Script to obtai ...

  6. el-input限制只能输入数字(开发小记)

    输入框中限制通常有三种处理方法 第一种:设置type属性(不推荐) 设置type属性为number,text等等,此方法输入框的后面会有不必要样式出现 <el-input type=" ...

  7. 源码编译搭建LNMP环境

    LNMP源码编译 1.LNMP介绍 LNMP=Linux Nginx Mysql PHP Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器.Ng ...

  8. 浅谈connect,withRouter,history,useState,useEffect

    1.connect in umi connect 可以链接不同的组件,从而在这个组件中使用其他组件的参数,常用于获取redux中存取的值. 2.withRouter in umi withRouter ...

  9. Command2

    Ctrl^c 强制终止当前命令执行 chmod {ugoa(user/group/other/all)}{+-=(wrx权限增删改)} 文件或目录 权限 对文件 对目录 r 可查看文件内容 可以列出目 ...

  10. Laravel - 验证码

    安装扩展包 使用 Composer 安装: composer require "mews/captcha:~2.0" 运行以下命令生成配置文件 config/captcha.php ...