setServerParams method

FutureOr<int> setServerParams(
  1. NSString signature,
  2. NSString url
)

@detail api @author hanchenchen.c @brief Sets application server parameters
Client side calls sendServerMessage:{@link #ByteRTCEngine#sendServerMessage} or sendServerBinaryMessage:{@link #ByteRTCEngine#sendServerBinaryMessage} Before sending a message to the application server, you must set a valid signature and application server address. @param signature Dynamic signature. The App server may use the signature to verify the source of messages.
You need to define the signature yourself. It can be any non-empty string. It is recommended to encode information such as UID into the signature.
The signature will be sent to the address set through the "url" parameter in the form of a POST request. @param url Address of the application server @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details @note - The user must call login:uid:{@link #ByteRTCEngine#login:uid} before logging in to call this interface. - After calling this interface, the SDK will use rtcEngine:onServerParamsSetResult:{@link #ByteRTCEngineDelegate#rtcEngine:onServerParamsSetResult} to return the corresponding result.

Implementation

FutureOr<int> setServerParams(NSString signature, NSString url) async {
  return await nativeCall('setServerParams:url:', [signature, url]);
}