Files
Logan.Li 3cb9545121 refactor(homepage): 官网/文档/定价源码迁出程序 + 新增独立授权与激活页 /license
- 官网源码归拢到 homepage/(index/pricing/terms/license + content/ + assets/ + docs-assets/),
  删除程序内 go:embed 的 server/internal/{site,docs},后端仅静态托管 homepage/dist 做本地预览
- 新增独立静态页 /license(授权与激活):交付与激活四步(邮件交付授权码)、
  在线授权码 LIC- 与离线许可证 LICOFF- 对比、授权服务器 licence.rlwj.cn 通信范围说明、
  授权类型与价格、10 条授权 FAQ
- tools/homepage-build 支持可选单页,产出 <name>.html 与 <name>/index.html
- 导航/页脚接入 /license,跨页锚点补 / 前缀,页脚底栏文案同步为静态站口径
2026-10-16 04:16:16 +08:00

46 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 连接
1. 填写服务地址(**不含** `/socket.io` 路径),如 `http://127.0.0.1:3000`。
2. 点击 **连接**,状态变为「已连接」后即可收发事件。
## 监听事件
「连接配置」→ **监听事件** 填逗号分隔的事件名:
```text
message, notification
```
留空则接收全部服务端事件(onAny 模式)。事件名在每条日志中标注。
## 发送(emit)
「事件」标签底部的发送区:
- **事件名**:如 `message`
- **参数**:JSON 数组,作为 `socket.emit(event, ...args)` 的参数
```json
["hello", 42]
```
## 连接选项
以 JSON 配置传给 socket.io-client:
```json
{
"path": "/socket.io",
"transports": ["websocket"],
"auth": { "token": "{{token}}" }
}
```
| 选项 | 说明 |
| --- | --- |
| path | 服务端挂载路径,默认 `/socket.io` |
| transports | `websocket` / `polling`,默认两者皆可 |
| auth | 握手鉴权载荷,支持 `{{变量}}` |
> **提示**:浏览器直连外部站点同样受 CORS 限制,Socket.IO 服务端需配置对应 origin,或把服务与本工具部署在同源下。