current constant

ClientProtocolVersion const current

The highest version this SDK build supports. Used as the default for ConnectOptions.clientProtocolVersion and in tests that need to advertise "the current SDK".

Web stays at v1: data streams v2 is implemented by the Rust core, which cannot run in a browser. Advertising a lower protocol there is what makes a v2 sender fall back to uncompressed multi-packet framing, which the Dart implementation understands.

Implementation

static const ClientProtocolVersion current = kIsWeb ? v1 : v2;