方法概览
客户端
- realtime() — 获取 Realtime 客户端
- channel() — 创建或复用频道
- getChannels() — 列出已创建频道
- removeChannel() — 移除单个频道
- removeAllChannels() — 移除全部频道并断开连接
- disconnect() — 断开 WebSocket
- connect() — 手动连接
- isConnected() — 是否已连接
频道
- subscribe() — 订阅频道
- on() — 监听 Broadcast / Presence / Postgres CDC
- send() — 发送消息
- httpSend() — 经 HTTP 发送 Broadcast
- track() — 上报在线状态
- untrack() — 取消在线状态
- presenceState() — 读取 Presence 快照
- unsubscribe() — 取消订阅
- postgresChangesFilter() — 构建 CDC 过滤条件