RFC6455-The WebSocket protocol 之三:WebSocket URIs
来源:互联网 发布:inside游戏 知乎 编辑:程序博客网 时间:2024/05/20 01:09
3.WebSocket URIs
This specification defines two URI schemes, using the ABNF syntax
defined in RFC 5234 [RFC5234], and terminology and ABNF productions
defined by the URI specification RFC 3986 [RFC3986].
本说明书定义了两种格式的URI,一种是[RFC5234]定义的ABNF ,一种是 [RFC3986]中定义的术语和ABNF。
ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ]
wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ]
// 对上面格式的说明
host = <host, defined in [RFC3986], Section 3.2.2>
port = <port, defined in [RFC3986], Section 3.2.3>
path = <path-abempty, defined in [RFC3986], Section 3.3>
query = <query, defined in [RFC3986], Section 3.4>
The port component is OPTIONAL; the default for "ws" is port 80,
while the default for "wss" is port 443.
端口选项是可选的;“ws”的默认端口是80,“wss”的默认端口是443.
The URI is called "secure" (and it is said that "the secure flag is
set") if the scheme component matches "wss" case-insensitively.
假如URI与“wss”匹配(不区分大小写),该URI就被称之为“安全的”(并且被称之为“安全标记已经设置”)。
The "resource-name" (also known as /resource name/ in Section 4.1)
can be constructed by concatenating the following:
o "/" if the path component is empty
o the path component
o "?" if the query component is non-empty
o the query component
“资源名”(同4.1节中的/资源名/)由以下部分组成:
- "/" 当路径为空的情况使用。
- 路径。
- "?" 当查询参数不为空使用。
- 查询参数。
Fragment identifiers are meaningless in the context of WebSocket URIs
and MUST NOT be used on these URIs. As with any URI scheme, the
character "#", when not indicating the start of a fragment, MUST be
escaped as %23.
在websocket的URI中,片段标识符是没有含义的而且不应该被使用。就像其它URI一样,当“#”不代表片段的开始时,必须转换成“%23”。
- RFC6455-The WebSocket protocol 之三:WebSocket URIs
- RFC6455-The WebSocket protocol 之二:Conformance Requirements
- RFC6455-The WebSocket protocol 之五:Opening Handshake 4.2-4.4
- RFC6455-The WebSocket protocol 之六:5. Data Framing
- RFC6455-The WebSocket protocol 之九:9. Extensions
- RFC6455-The WebSocket protocol 之十:10. Security Considerations
- RFC6455-The WebSocket protocol 之一:1. Introduction
- RFC6455-The WebSocket protocol 之八:7. Closing the Connection & 8. Error Handling
- RFC6455-The WebSocket protocol 之四:Opening Handshake 4.1. Client Requirements
- RFC6455-The WebSocket protocol 之七:6. Sending and Receiving Data
- RFC6455-The WebSocket protocol 之十一(终结版):11. IANA Considerations
- The WebSocket protocol
- websocket规范 RFC6455 中文版
- websocket规范 RFC6455 中文版
- websocket URIS翻译
- websocket规范 RFC6455 中文版
- Websocket Application Messaging Protocol
- WebSocket
- 定义DataGridView某列的类型
- C#switch语句
- 关于appearance的圆角
- Hibernate框架学习(二)
- LeetCode之Remove Duplicates from Sorted Array
- RFC6455-The WebSocket protocol 之三:WebSocket URIs
- C++中cout/cin对于空指针、字符指针的处理,及输入>>、 输出<<操作符的重载
- bitsets 易错的点
- PMP考试--成本管理中常用的概念
- iOS 蓝牙使用
- 数据结构(结构体定义,typedef)
- sencha+phonegap
- LeetCode之Remove Element
- Pascal's Triangle II