2024/04/23 10:53:01
特性列表
本文提供 RTM 所具备的功能特性及对应 API 接口。
Setup
| 功能 | API 接口 |
|---|---|
| 创建实例 | initWithConfig:delegate:error |
| 销毁实例 | [rtm destroy] |
| Token 设置 | AgoraRtmClientConfig 中的 token 参数 |
| 端侧加密 | AgoraRtmClientConfig 中的 encryptionConfig 参数 |
| Presence 超时设置 | AgoraRtmClientConfig 中的 presenceTimeout 参数 |
| 日志等级设置 | AgoraRtmLogConfig 中的 level 参数 |
| Proxy 设置 | AgoraRtmProxyConfig 中的 proxyType、server、port、account、password 参数 |
| 消息传输协议设置 | AgoraRtmClientConfig 中的 protocolType 参数 |
| 私有化部署设置 | AgoraRtmPrivateConfig 中的 serviceType、accessPointHosts 参数 |
| 事件监听 | |
| 登录服务 | [rtm loginByToken:completion:] |
| 登出服务 | [rtm logout:completion] |
Channel
| 功能 | API 接口 |
|---|---|
| 订阅频道 | [rtm subscribeWithChannel:option:completion] |
| 取消订阅频道 | [rtm unsubscribeWithChannel:completion] |
| 创建 Stream Channel | [rtm createStreamChannel:error] |
| 加入 Stream Channel | [streamChannel joinWithOption:completion] |
| 离开 Stream Channel | [streamChannel leave] |
| 销毁 Stream Channel | [streamChannel destroy] |
Topic
Message
| 功能 | API 接口 |
|---|---|
| 发送消息 | [rtm publish:message:option:completion] |