> For the complete documentation index, see [llms.txt](https://socket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://socket.gitbook.io/docs/2-wen-dang-docs.md).

# 2 文档(Docs)

- [2.1 概览](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan.md)
- [2.1.1 啥是Socket.io](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/what_socket.io_is.md)
- [2.1.2 Socket.io不是什么](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/what_socket.io_is_not.md)
- [2.1.3 安装](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/installing.md)
- [2.1.4 在Node HTTP 服务中使用](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/using_with_node_http_server.md)
- [2.1.5 在express中使用Socket.io](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/using_with_express.md)
- [2.1.6 发送和接收事件](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/sending_and_receiving_events.md)
- [2.1.7 限制自己使用命名空间](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/restricting_yourself_to_a_namespace.md)
- [2.1.8 发送易失性的消息](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/sending_volatile_message.md)
- [2.1.9 发送和获取数据(确认)](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/sending_and_getting_data_acknowledgements.md)
- [2.1.10 广播消息](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/broadcasting_messages.md)
- [2.1.111 作为跨浏览器使用websocket](https://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/using_it_just_as_a_cross_browser_websocket.md)
- [2.2 房间和命名空间](https://socket.gitbook.io/docs/2-wen-dang-docs/2.2-fang-jian-he-ming-ming-kong-jian.md)
- [2.2.1 命名空间](https://socket.gitbook.io/docs/2-wen-dang-docs/2.2-fang-jian-he-ming-ming-kong-jian/namespaces.md)
- [2.2.2 房间](https://socket.gitbook.io/docs/2-wen-dang-docs/2.2-fang-jian-he-ming-ming-kong-jian/rooms.md)
- [2.2.3 给外部发送消息](https://socket.gitbook.io/docs/2-wen-dang-docs/2.2-fang-jian-he-ming-ming-kong-jian/sending_message_from_the_outside-world.md)
- [2.3 从0.9迁移版本 migrating\_from\_0.9](https://socket.gitbook.io/docs/2-wen-dang-docs/2.3-cong-0.9-qian-yi-ban-ben-migratingfrom0.9.md)
- [2.3.1 身份验证差异](https://socket.gitbook.io/docs/2-wen-dang-docs/2.3-cong-0.9-qian-yi-ban-ben-migratingfrom0.9/authentication_differences.md)
- [2.3.2 日志差异](https://socket.gitbook.io/docs/2-wen-dang-docs/2.3-cong-0.9-qian-yi-ban-ben-migratingfrom0.9/log_differences.md)
- [2.3.3 快捷方式](https://socket.gitbook.io/docs/2-wen-dang-docs/2.3-cong-0.9-qian-yi-ban-ben-migratingfrom0.9/shorcuts.md)
- [2.3.4 配置差异](https://socket.gitbook.io/docs/2-wen-dang-docs/2.3-cong-0.9-qian-yi-ban-ben-migratingfrom0.9/configuration_differences.md)
- [2.3.5 解析器/协议差异](https://socket.gitbook.io/docs/2-wen-dang-docs/2.3-cong-0.9-qian-yi-ban-ben-migratingfrom0.9/parser_protocol_differences.md)
- [2.4 多路节点使用](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong.md)
- [2.4.1 Apache httpd配置](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong/apache_httpd_configuration.md)
- [2.4.2 在节点之间传递事件](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong/passing_events_between_nodes.md)
- [2.4.3 Haproxy配置](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong/haproxy_configuration.md)
- [2.4.4 粘性负载均衡](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong/sticky_load_balancing.md)
- [2.4.5 Nginx配置](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong/nginx_configuration.md)
- [2.4.6 使用node.js集群](https://socket.gitbook.io/docs/2-wen-dang-docs/2.4-duo-lu-jie-dian-shi-yong/using_node.js_cluster.md)
- [2.5 日志和调试](https://socket.gitbook.io/docs/2-wen-dang-docs/2.5-ri-zhi-he-tiao-shi.md)
- [2.5.1 可用的调试范围](https://socket.gitbook.io/docs/2-wen-dang-docs/2.5-ri-zhi-he-tiao-shi/available_debugging_scopes.md)
- [2.6 emit 备忘单](https://socket.gitbook.io/docs/2-wen-dang-docs/emit_cheatsheet.md)
- [2.7 内部概述](https://socket.gitbook.io/docs/2-wen-dang-docs/2.7-nei-bu-gai-shu.md)
- [2.7.1 内部概述引擎底层依赖关系图](https://socket.gitbook.io/docs/2-wen-dang-docs/2.7-nei-bu-gai-shu/internals_overview_dependency_graph_under_the_hood.md)
- [2.7.2 内部概述关系图](https://socket.gitbook.io/docs/2-wen-dang-docs/2.7-nei-bu-gai-shu/internals_overview_dependency_graph.md)
- [2.8 faq](https://socket.gitbook.io/docs/2-wen-dang-docs/faq.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://socket.gitbook.io/docs/2-wen-dang-docs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
