Module ws

Module ws 

Source
Expand description

WebSocket 推送模块

在 REST API 端口上提供 /ws 路由,客户端通过 WebSocket 接收实时推送。

推送事件通过 broadcast channel 从 OpenD 核心分发到所有 WebSocket 客户端。

Structs§

WsBroadcaster
WebSocket 推送广播器
WsPushEvent
WebSocket 推送事件

Enums§

WsPushScope
WS 推送事件需要的最低 scope(client 没这个 scope 就收不到)

Functions§

ws_handler
WebSocket 升级处理