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

最新文章

  1. java泛型基础
  2. 阿里的maven私服
  3. iOS应用中URL地址如何重定向-b
  4. HTML5学习(七)----地理定位
  5. iptables与tcpdump谁更靠近网卡
  6. Tag file directory /struts-tags does not start with "/WEB-INF/tags"
  7. Android 输入法键盘和activity页面遮挡问题解决
  8. android禁用光感按键
  9. android studio github 项目导入问题
  10. JavaScript当中的eval函数
  11. Linux之环境变量
  12. makefile在编译的过程中出现“except class name”
  13. codeforce round #467(div.2)
  14. sqlalchemy的数据库ORM操作(表之间的关系)
  15. CentOS7 安装Python3,开发SocketIO 客户端
  16. ES6的小知识(后半部分)
  17. linux文件目录管理命令
  18. 【H5】滚动事件(jq)
  19. python测试开发django-23.admin列表页优化和排序
  20. iOS 工程自动化 - OCLint

热门文章

  1. Java安全之初探weblogic T3协议漏洞
  2. 拖拽一个元素如此简单,mouse、drag、touch三兄弟的用处
  3. [leetcode]168. Excel Sheet Column Title表格列名编码(十进制和多进制相互转换)
  4. Keil4 uVision软件生成hex文件
  5. redo log 有什么作用?
  6. HTML表格样式
  7. JAVA的一些笔记
  8. lambda表达式初识
  9. 基于nginx实现web服务器的双机热备
  10. fastjson复现项目代码