getMaximumWriteLength method

Future<int> getMaximumWriteLength(
  1. String deviceId, {
  2. bool withoutResponse = true,
})

获取当前连接可写入的最大字节数。

参数:

  • deviceId:已连接设备标识,无默认值。
  • withoutResponse:是否按无响应写计算,默认 true。吞吐优先推荐 true;需要 每包确认时传 false。Android 当前按已知 MTU 返回 mtu - 3;iOS/macOS 会区分 .withoutResponse.withResponse;Linux/Windows/Web 不公开该值,返回 0

Implementation

Future<int> getMaximumWriteLength(
  String deviceId, {
  bool withoutResponse = true,
}) {
  throw UnimplementedError(
    'getMaximumWriteLength() has not been implemented.',
  );
}