Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
TheWebSocketprotocol understands the concept of subprotocols. If the client is requesting one of a set of subprotocols it will set the header [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol] in the initial WebSocket Upgrade HTTP request. It is up to the server to parse the header and select one of the protocols to accept. The server indicates the selected protocol by setting the协议支持子协议的概念。如果客户端请求使用某个子协议,它会在初始 WebSocket 升级 HTTP 请求中设置 [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol] 头部。服务器需要解析该头部,并从中选择一个协议接受。服务器通过在响应头部中设置 [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol]header in the accept header.头部来指示所选协议。