sendServerMessage method
@detail api
@author hanchenchen.c
@brief The client side sends a text message to the application server (P2Server)
@param message
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{@link #RTCEngine#login} to complete the login, and then call setServerParams{@link #RTCEngine#setServerParams} Set up the application server.
- After calling this interface, you will receive an onServerMessageSendResult{@link #IRTCEngineEventHandler#onServerMessageSendResult} 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 the setServerParams{@link #RTCEngine#setServerParams} setting will receive the message.
Implementation
FutureOr<long> sendServerMessage(String message) async {
return await nativeCall('sendServerMessage', [message]);
}