onServerMessageSendResult method

FutureOr<void> onServerMessageSendResult(
  1. dynamic msgid,
  2. dynamic error,
  3. dynamic message
)
override

@detail callback @author hanchenchen.c @brief Receives the callback after sending the message to the application server successfully. @param msgid The ID of this message
All P2P and P2Server messages share a single ID sequence. @param error Message Sending Results. See UserMessageSendResult{@link #UserMessageSendResult}. @param message The message returned in ACK when the application server receives HTTP request. The message should not exceed 64 KB. @note This callback is asynchronous. You will receive this callback when you call sendServerMessage{@link #RTCEngine#sendServerMessage} or sendServerBinaryMessage{@link #RTCEngine#sendServerBinaryMessage} to send a message to your application server.

Implementation

FutureOr<void> onServerMessageSendResult(
    dynamic msgid, dynamic error, dynamic message) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler)
      .onServerMessageSendResult
      ?.call(
          int.tryParse(msgid.toString()) ?? 0,
          t_UserMessageSendResult.android_to_code($p_a
              .UserMessageSendResult.values
              .firstWhere((t) => t.$value == error || t.name == error)),
          message);
}