chore(stage-pocket): add websocket bridge docs

This commit is contained in:
LemonNeko
2026-04-03 15:21:38 +08:00
parent f765dff8ff
commit 881877e1e0
+10
View File
@@ -5,3 +5,13 @@
</p>
> Heavily inspired by [Neuro-sama](https://www.youtube.com/@Neurosama)
## WebSocket Bridge
Stage Pocket adds a host-backed WebSocket bridge for `@proj-airi/server-sdk`.
Design constraints:
- keep page loading on secure origins (`https` or app-hosted local origins) to preserve secure-context web APIs
- only implement the WebSocket bridge needed by `@proj-airi/server-sdk`
- native owns socket I/O; `server-sdk` owns reconnect, heartbeat, authentication, and connection state
- the bridge only forwards `connect`, `send`, `close`, `open`, `message`, `error`, and `close`