RawSocketOption.fromBool 构造函数

RawSocketOption.fromBool(
  1. "../../dart-core/int-class.html">int level,
  2. "../../dart-core/int-class.html">int option,
  3. "../../dart-core/bool-class.html">bool value
)

用于创建基于布尔值的 "../../dart-io/RawSocketOption-class.html">RawSocketOption 的便利构造函数。

实现

factory RawSocketOption.fromBool(int level, int option, bool value) =>
    RawSocketOption.fromInt(level, option, value ? 1 : 0);