You need to enable JavaScript to run this app.
导航

客户端与客户端通信

最近更新时间2023.06.14 11:34:59

首次发布时间2022.09.16 15:44:38

发送房间内点对点消息

API 参考

功能简述AndroidiOSmacOSWindowsLinuxWeb
加入房间joinRoomjoinRoom:userInfo:roomConfig:joinRoom:userInfo:roomConfig:joinRoomjoinRoomjoinRoom
加入房间结果回调onRoomStateChangedrtcRoom:onRoomStateChanged:withUid:state:extraInfo:rtcRoom:onRoomStateChanged:withUid:state:extraInfo:onRoomStateChangedonRoomStateChanged/
给房间内指定的用户发送文本消息sendUserMessagesendUserMessage:message:config:sendUserMessage:message:config:sendUserMessagesendUserMessagesendUserMessage
接收到消息所属用户发送的文本消息内容onUserMessageReceivedrtcRoom:onUserMessageReceived:message:rtcRoom:onUserMessageReceived:message:onUserMessageReceivedonUserMessageReceivedonUserMessageReceived
给房间内指定的用户发送二进制消息sendUserBinaryMessagesendUserBinaryMessage:message:config:sendUserBinaryMessage:message:config:sendUserBinaryMessagesendUserBinaryMessagesendUserBinaryMessage
接收到消息所属用户发送的二进制消息内容onUserBinaryMessageReceivedrtcRoom:onUserBinaryMessageReceived:message:rtcRoom:onUserBinaryMessageReceived:message:onUserBinaryMessageReceivedonUserBinaryMessageReceivedonUserBinaryMessageReceived
查看发送消息结果onUserMessageSendResultrtcRoom:onUserMessageSendResult:error:rtcRoom:onUserMessageSendResult:error:onUserMessageSendResultonUserMessageSendResult/

发送房间内广播消息

API 参考

功能简述AndroidiOSmacOSWindowsLinuxWeb
加入房间joinRoomjoinRoom:userInfo:roomConfig:joinRoom:userInfo:roomConfig:joinRoomjoinRoomjoinRoom
加入房间结果回调onRoomStateChangedrtcRoom:onRoomStateChanged:withUid:state:extraInfo:rtcRoom:onRoomStateChanged:withUid:state:extraInfo:onRoomStateChangedonRoomStateChanged/
给房间内所有用户发送文本消息sendRoomMessagesendRoomMessage:sendRoomMessage:sendRoomMessagesendRoomMessagesendRoomMessage
接收到房间内文本广播消息onRoomMessageReceivedrtcRoom:onRoomMessageReceived:message:rtcRoom:onRoomMessageReceived:message:onRoomMessageReceivedonRoomMessageReceivedonRoomMessageReceived
给房间内所有用户发送二进制消息sendRoomBinaryMessagesendRoomBinaryMessage:sendRoomBinaryMessage:SendRoomBinaryMessageSendRoomBinaryMessageSendRoomBinaryMessage
接收到房间内二进制广播消息onRoomBinaryMessageReceivedrtcRoom:onRoomBinaryMessageReceived:message:rtcRoom:onRoomBinaryMessageReceived:message:onRoomBinaryMessageReceivedonRoomBinaryMessageReceivedonRoomBinaryMessageReceived
查看发送广播消息结果onRoomMessageSendResultrtcRoom:onRoomMessageSendResult:error:rtcRoom:onRoomMessageSendResult:error:onRoomMessageSendResultonRoomMessageSendResult/

发送房间外点对点消息

API 参考

功能简述AndroidiOSmacOSWindowsLinuxWeb
登录loginlogin:uid:login:uid:loginloginlogin
收到登录结果onLoginResultrtcEngine:onLoginResult:errorCode:elapsed:rtcEngine:onLoginResult:errorCode:elapsed:onLoginResultonLoginResult/
更新用于登录的 Token(可选)updateLoginTokenupdateLoginToken:updateLoginToken:updateLoginTokenupdateLoginTokenupdateLoginToken
查询对端或本端用户在线状态(可选)getPeerOnlineStatusgetPeerOnlineStatus:getPeerOnlineStatus:getPeerOnlineStatusgetPeerOnlineStatusgetPeerOnlineStatus
获取用户在线状态查询结果(可选)onGetPeerOnlineStatusrtcEngine:onGetPeerOnlineStatus:status:rtcEngine:onGetPeerOnlineStatus:status:onGetPeerOnlineStatusonGetPeerOnlineStatus/
向房间外用户发送文本消息sendUserMessageOutsideRoomsendUserMessageOutsideRoom:message:config:sendUserMessageOutsideRoom:message:config:sendUserMessageOutsideRoomsendUserMessageOutsideRoomsendUserMessageOutsideRoom
收到房间外用户发送的文本消息onUserMessageReceivedOutsideRoomrtcEngine:onUserMessageReceivedOutsideRoom:message:rtcEngine:onUserMessageReceivedOutsideRoom:message:onUserMessageReceivedOutsideRoomonUserMessageReceivedOutsideRoomonUserMessageReceivedOutsideRoom
向房间外用户发送二进制消息sendUserBinaryMessageOutsideRoomsendUserBinaryMessageOutsideRoom:message:config:sendUserBinaryMessageOutsideRoom:message:config:sendUserBinaryMessageOutsideRoomsendUserBinaryMessageOutsideRoomsendUserBinaryMessageOutsideRoom
收到房间外用户发送的二进制消息onUserBinaryMessageReceivedOutsideRoomrtcEngine:onUserBinaryMessageReceivedOutsideRoom:message:rtcEngine:onUserBinaryMessageReceivedOutsideRoom:message:onUserBinaryMessageReceivedOutsideRoomonUserBinaryMessageReceivedOutsideRoomonUserBinaryMessageReceivedOutsideRoom
获得消息发送结果onUserMessageSendResultOutsideRoomrtcEngine:onUserMessageSendResultOutsideRoom:error:rtcEngine:onUserMessageSendResultOutsideRoom:error:onUserMessageSendResultOutsideRoomonUserMessageSendResultOutsideRoom/
登出logoutlogoutlogoutlogoutlogoutlogout
收到登出结果onlogoutrtcEngineOnLogout:rtcEngineOnLogout:onLogoutonLogout/