实时信令(Realtime Signaling, RTS)产品是基于低时延、高并发的全球实时消息系统框架开发的一套轻量级高可靠的消息传输服务。
通过集成RTS SDK既可以轻松获得高并发、低时延、稳定必达的消息传输通道。结合实时音视频互动SDK可帮助开发者快速构建如互动教学、语聊房、视频直播、通话等多种业务场景
移动端特有的实时信令服务SDK代号为Hummer
。
方法 | 功能 |
---|---|
state | 获取HummerSDK 当前所处的状态 |
startWithAppId:appVersion:eventObserver: | 初始化Hummer,同时开始监听Hummer的状态改变 |
loginWithUid:region:token:completion: | 登录SDK |
logout | 登出SDK |
refreshToken:completion: | 刷新用户凭证 |
sdkVersion | 获取 SDK 版本信息 |
setLoggerFilePath: | 需要设置的日志存储路径,调用方应确保路径存在 |
setLogLevel: | 设置日志输出级别 |
setLogCallback: | 设置日志输出回调 |
uploadLogsManually: | 手动上报日志 |
回调 | 功能 |
---|---|
didHummerStateChanged:toState:withReason: | SDK状态变化回调 |
didHummerKicked:withDescription: | SDK收到多端登录被踢的回调方法 |
didHummerPreviousTokenExpired | 用户凭证过期回调 |
方法 | 功能 |
---|---|
instance | 创建实例并初始化 |
queryUserOnlineStatus:completion: | 批量查询用户在线,可以查询具体用户是否在线 |
sendMessage:withOptions:toUser:completion: | 发送点对点信令消息 |
addObserver: | 添加消息监听 |
removeObserver: | 移除消息监听 |
回调 | 功能 |
---|---|
didPeerMessageReceived:fromUser: | 当收到点对点信令消息时,会收到该事件的通知回调 |
方法 | 功能 |
---|---|
instance | 创建实例并初始化 |
queryMemberCounts:roomRegion:completion: | 批量查询房间成员总数 |
setRoomAttributes:withAttributes:options:completion: | 设置房间属性 |
addOrUpdateRoomAttributes:withAttributes:options:completion: | 添加或者更新指定房间的属性 |
deleteRoomAttributes:byKeys:options:completion: | 删除指定房间的指定属性 |
clearRoomAttributes:withOptions:completion: | 清空指定房间属性 |
queryRoomAttributes:byKeys:completion: | 查询指定房间的指定属性 |
queryRoomAttributes:completion: | 查询指定房间的全部属性 |
sendMessage:withOptions:inRoom:completion: | 发送房间消息 |
addRoomObserver: | 添加 Room 的监听器 |
removeRoomObserver: | 移除 Room 的监听器 |
回调 | 功能 |
---|---|
didRoomMessageReceived:fromUser:inRoom: | 用户往房间内发信令消息时,房间内成员收到的通知 |
didRoomAttributesSet:withAttributes:byUser: | 房间属性设置通知 |
didRoomAttributesAddedOrUpdated:withAttributes:byUser: | 房间属性新增或更新通知 |
didRoomAttributesDeleted:withAttributes:byUser: | 房间属性删除通知 |
didRoomAttributesCleared:withAttributes:byUser: | 房间属性清空通知 |
方法 | 功能 |
---|---|
joinRoom:withAppExtras:options:completion: | 进入房间 |
leaveRoom:completion: | 退出房间 |
queryMembers:completion: | 获取指定房间的成员列表 |
setMemberAttributes:inRoom:withAttributes:options:completion: | 设置当前用户在当前房间的用户属性 |
addOrUpdateMemberAttributes:inRoom:withAttributes:options:completion: | 新增或更新用户在当前房间属性 |
deleteMemberAttributes:inRoom:byKeys:options:completion: | 删除用户在当前房间的某些用户属性 |
clearMemberAttributes:inRoom:options:completion: | 清空用户在房间内的所有属性 |
queryMemberAttributtes:inRoom:byKeys:completion: | 查看用户在当前房间指定属性 |
queryMemberAttributtes:inRoom:completion: | 查看用户在当前房间所有属性 |
addMemberObserver: | 添加 Member 的监听器 |
removeMemberObserver: | 移除 Member 的监听器 |
回调 | 功能 |
---|---|
didRoomMemberJoined:inRoom: | 成员进入房间通知 |
didRoomMemberLeft:inRoom: | 成员离开房间通知 |
didRoomMemberOffline: | 当前用户断线超时离开房间通知 |
didRoomMemberCountChanged:ofCount: | 房间人数变更通知 |
didRoomMemberAttributesSet:inRoom:withAttributes: | 房间成员的用户属性设置回调通知 |
didRoomMemberAttributesAddedOrUpdated:inRoom:withAttributes: | 房间成员的用户属性新增或更新回调通知 |
didRoomMemberAttributesDeleted:inRoom:withAttributes: | 房间成员的用户属性删除回调通知 |
didRoomMemberAttributesCleared:inRoom:withAttributes: | 房间成员的用户属性清空回调通知 |