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. Io流阶段大总结

    字节流结构 输入流: ObjectInputStream:从文件中读取对象 FileInputStream:从文件中输入(读)字节 BufferedInputStream:底层有缓冲数组,在不定义数组 ...

  2. maven方式使用jetty

    Jetty 是一个开源的servlet容器,它为基于Java的web容器,例如JSP和servlet提供运行环境.Jetty是使用Java语言编写的,它的API以一组JAR包的形式发布.开发人员可以将 ...

  3. Appium自动化如何控制多设备并行执行

    前言: 如何做到,控制多设备并行执行测试用例呢. 思路篇 我们去想下,我们可以获取参数的信息,和设备的信息,那么​我们也可以针对每台设备开启不一样的端口服务.那么每个服务都对应的端口,我们在获取设备列 ...

  4. Net/NetCore/.NET5 ORM 六大查询体系 - SqlSugar 高级篇

    框架介绍 SqlSugar ORM是一款老牌国产ORM框架,生命力也比较顽强,从早期ORM不成熟阶段,一直存活到现在,我为什么要一直坚持,那是因为还有很多用户在使用,本来我能够较早推出新开源框架 ,可 ...

  5. 浅谈java中的枚举类型(转)

    用法一:常量 在JDK1.5 之前,我们定义常量都是: public static fianl.... .现在好了,有了枚举,可以把相关的常量分组到一个枚举类型里,而且枚举提供了比常量更多的方法. p ...

  6. vscode 安装与配置

    vscode 安装与配置 安装 安装 vscode 从官网 [https://code.visualstudio.com/Download] 下载速度奇慢,可以找到下载的网址,如下图所示,将其中红色框 ...

  7. flume伪分布式安装

    flume伪分布式安装: 1.导包:apache-flume-1.7.0-bin.tar.gz 2.配置环境变量:/etc/profile export FLUME_HOME=/yang/apache ...

  8. 风炫安全web安全学习第三十一节课 命令执行以及代码执行演示

    风炫安全web安全学习第三十一节课 命令执行以及代码执行演示 参考: http://blog.evalshell.com/2020/12/20/风炫安全web安全学习第三十一节课-命令执行以及代/

  9. 使用python做一个IRC在线下载器

    使用python做一个IRC在线下载器 1.开发流程 2.软件流程 3.开始 3.0 准备工作 3.1寻找API接口 3.2 文件模块 3.2.1 选择文件弹窗 3.2.2 提取文件名 3.2.2.1 ...

  10. 白日梦的Elasticsearch笔记(一)基础篇

    目录 一.导读 1.1.认识ES 1.2.安装.启动ES.Kibana.IK分词器 二.核心概念 2.1.Near Realtime (NRT) 2.2.Cluster 2.3.Node 2.4.In ...