sendCustomCmdMsg method

bool sendCustomCmdMsg(
  1. int cmdID,
  2. String data,
  3. bool reliable,
  4. bool ordered,
)

Implementation

bool sendCustomCmdMsg(int cmdID, String data, bool reliable, bool ordered) {
  ffi.Pointer<ffi.Uint8> dataPointer = data.toNativeUtf8().cast<ffi.Uint8>();

  int result = _trtcFFIBindings.send_sustom_cmd_msg(_trtcsharedInstanceNativePointer, cmdID, dataPointer, utf8.encode(data).length, reliable, ordered);

  calloc.free(dataPointer);
  return result != 0;
}