# W

## WebSocket

WebSocket 是一种通信协议，它实现在客户端和服务器之间的实时双向数据传输。与 HTTP 不同，HTTP 是一种请求/响应协议，而 WebSocket 是一种持久连接，允许在无需客户端为每次数据交换发起新请求的情况下实现实时双向数据交换。WebSocket 特别适用于需要实时更新和低延迟的应用，如在线游戏、实时金融数据和聊天应用。它允许客户端和服务器之间高效、快速地通信，减少延迟并提供更好的用户体验。WebSocket 通过握手过程建立客户端与服务器之间的连接。一旦连接建立，服务器可以随时向客户端推送数据，而客户端也可以在无需新的请求/响应周期的情况下向服务器发送数据。WebSocket 使用二进制或基于文本的数据格式进行数据传输，具体取决于应用需求。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/glossary/u-z/w.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
