Expand description
WebSocket 推送模块
在 REST API 端口上提供 /ws 路由,客户端通过 WebSocket 接收实时推送。
推送事件通过 broadcast channel 从 OpenD 核心分发到所有 WebSocket 客户端。
Structs§
- WsBroadcaster
- WebSocket 推送广播器
- WsPush
Event - WebSocket 推送事件
Enums§
- WsPush
Scope - WS 推送事件需要的最低 scope(client 没这个 scope 就收不到)
Constants§
- REST_
WS_ MAX_ CONTROL_ MESSAGE_ SIZE_ BYTES - REST
/wsonly accepts tiny JSON control messages from clients (subscribe-notify/unsubscribe-notify). Push payload size is governed by outbound serialization; this is an inbound resource boundary.
Functions§
- ws_
handler - WebSocket 升级处理