# 2.1.2 Socket.io不是什么

`Socket.IO`不是WebSocket实现。 尽管`Socket.IO`确实在可能的情况下使用WebSocket作为传输，但它会为每个数据包添加一些元数据：数据包类型，命名空间和需要消息确认时的确认ID。 这就是为什么WebSocket客户端无法成功连接到`Socket.IO`服务器，而`Socket.IO`客户端也无法连接到WebSocket服务器。 请在此处查看协议规范。[请戳>](https://github.com/socketio/socket.io-protocol)

```javascript
// 警告：这个客户端将不支持连接！
const client= io('ws://echo.websocket.org');
```


---

# 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://socket.gitbook.io/docs/2-wen-dang-docs/2.1-gai-lan/what_socket.io_is_not.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.
