2024/11/06 15:20:23
特性列表
本文提供 RTM 所具备的功能特性及对应 API 接口。
Setup
功能 | API 接口 |
---|---|
创建实例 | AgoraRtmClientKit(_ config: AgoraRtmClientConfig, delegate: (any AgoraRtmClientDelegate)?) |
销毁实例 | rtm.destroy() -> AgoraRtmErrorCode |
Token 设置 | AgoraRtmClientConfig 中的 token 参数 |
端侧加密 | AgoraRtmClientConfig 中的 encryptionConfig 参数 |
Presence 超时设置 | AgoraRtmClientConfig 中的 presenceTimeout 参数 |
日志等级设置 | AgoraRtmLogConfig 中的 level 参数 |
Proxy 设置 | AgoraRtmProxyConfig 中的 proxyType 、server 、port 、account 、password 参数 |
消息传输协议设置 | AgoraRtmClientConfig 中的 protocolType 参数 |
私有化部署设置 | AgoraRtmPrivateConfig 中的 serviceType 、accessPointHosts 参数 |
事件监听 | |
登录服务 | rtm.login(_ token: String?, completion completionBlock: AgoraRtmOperationBlock? = nil) |
登出服务 | rtm.logout(_ completionBlock: AgoraRtmOperationBlock? = nil) |
Channel
Topic
Message
功能 | API 接口 |
---|---|
发送消息 | [rtm publish:message:option:completion] |