Files
AIGame/Doc/NetProtocol.md
T
udxandCursor b7a0bbcb89 Add hot-update boot pipeline, UI bundles/atlas assets, and design docs.
Ignore AIClient/Library and AIClient/HybridCLRData permanently; include HybridCLR/YooAsset project setup and UI tooling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 16:02:58 +08:00

26 lines
783 B
Markdown
Raw 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.
# 游戏服协议(M2 探测结论)
Base: `https://game.xworld.ren`(Caddy → Kestrel)
## HTTP
| 方法 | 路径 | Body | 成功 | 失败 |
| --- | --- | --- | --- | --- |
| POST | `/register` | `{"username","password"}` | `{token,pid}` | `invalid_input` 等 |
| POST | `/login` | `{"username","password"}` | `{token,pid}` | `invalid_credentials` |
## WebSocket
```
wss://game.xworld.ren/ws?pid={pid}&token={token}
```
- 无 token → HTTP 401(握手阶段拒绝)
- 连通后服务端可不主动推消息;客户端可用 WebSocket 协议层 KeepAlive
- 应用层可发 `{"op":"hello",...}`(当前服可无应答)
## 客户端
- `HotUpdate.Net.AuthApi` / `GameNet` / `WsClient`
- 编辑器自动 `guest_{deviceId}` 账号(PlayerPrefs 持久化 deviceId)