sendServerMessage method

FutureOr<NSInteger> sendServerMessage(
  1. NSString messageStr
)

@detail api @author hanchenchen.c @brief Client side sends a text message to the application server (P2Server) @param messageStr
The content of the text message sent
The message does not exceed 64 KB. @return - > 0: Sent successfully, return the number of the sent message, increment from 1. @note - Before sending a text message to the application server, you must first call login:uid:{@link #ByteRTCEngine#login:uid} to complete the login, and then call setServerParams:url:{@link #ByteRTCEngine#setServerParams:url} Set up the application server. - After calling this interface, you will receive an rtcEngine:onServerMessageSendResult:error:message:{@link #ByteRTCEngineDelegate#rtcEngine:onServerMessageSendResult:error:message} callback to inform the message sender whether the message was sent successfully. - If the text message is sent successfully, the application server that previously called setServerParams:url:{@link #ByteRTCEngine#setServerParams:url} will receive the message.

Implementation

FutureOr<NSInteger> sendServerMessage(NSString messageStr) async {
  return await nativeCall('sendServerMessage:', [messageStr]);
}