sendUserBinaryMessage method
- NSString uid,
- NSData message,
- ByteRTCMessageConfig config
@detail The api
@brief Sends a binary message (P2P) to the specified user in the room.
@param uid
Message Receiving user's ID
@param message
Binary message content sent
Message does not exceed 46KB.
@param config See ByteRTCMessageConfig{@link #ByteRTCMessageConfig}.
@return The number of the message sent this time is incremented from 1.
@note
- Before sending the in-room binary message, you must call joinRTSRoom:userInfo:{@link #ByteRTCRTSRoom#joinRTSRoom:userInfo} to join the room.
- After calling this function, you will receive an rtsRoom:onUserMessageSendResult:error:{@link #ByteRTCRTSRoomDelegate#rtsRoom:onUserMessageSendResult:error} callback to notify the sender of the success or failure of the message;
- If the binary message is sent successfully, the user specified by uid will receive rtsRoom:onUserBinaryMessageReceived:message:{@link #ByteRTCRTSRoomDelegate#rtsRoom:onUserBinaryMessageReceived:message} callback.
Implementation
FutureOr<int64_t> sendUserBinaryMessage(
NSString uid, NSData message, ByteRTCMessageConfig config) async {
return await nativeCall(
'sendUserBinaryMessage:message:config:', [uid, message, config.$value]);
}