requestMtu static method

Future<int> requestMtu(
  1. String deviceId,
  2. int expectedMtu, {
  3. Duration? timeout,
})

Request MTU value. It will attempt to set the MTU (Maximum Transmission Unit) but it is not guaranteed to succeed due to platform limitations. It will always return the current MTU.

Implementation

static Future<int> requestMtu(
  String deviceId,
  int expectedMtu, {
  Duration? timeout,
}) async {
  return await _bleCommandQueue.queueCommand(
    () => _platform.requestMtu(deviceId, expectedMtu),
    timeout: timeout,
    deviceId: deviceId,
  );
}