BluetoothGattConnectionSettings.Builder.SetAutomaticMtuEnabled 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置是否需要协商 MTU (最大传输单位) 以获得给定的连接。
[Android.Runtime.Register("setAutomaticMtuEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)]
public Android.Bluetooth.BluetoothGattConnectionSettings.Builder SetAutomaticMtuEnabled(bool automaticMtuEnabled);
[<Android.Runtime.Register("setAutomaticMtuEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)>]
member this.SetAutomaticMtuEnabled : bool -> Android.Bluetooth.BluetoothGattConnectionSettings.Builder
参数
- automaticMtuEnabled
- Boolean
如果此连接需要应用默认 MTU 设置,则为 true;否则为 false。
返回
此生成器。 此值不能为 null。
- 特性
注解
设置是否需要协商 MTU (最大传输单位) 以获得给定的连接。 默认情况下,这设置为 true,以便在连接后进行 MTU 交换。 应用程序必须将其设置为 false 才能禁用自动协商。 如果客户端显式请求 MTU RequestMtu(Int32) 协商,或者由其他配置文件在内部触发,则设置为 false 不会阻止 MTU 协商。
Android 参考。android.bluetooth.BluetoothGattConnectionSettings.Builder.setAutomaticMtuEnabled
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。