commit | 63831cb74c5a413da893bda0fa4a80b5cb567076 | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch@google.com> | Tue Sep 20 19:16:54 2022 |
committer | GitHub <noreply@github.com> | Tue Sep 20 19:16:54 2022 |
tree | c16b767fc20ff0878df024cc643362a52aae7de1 | |
parent | 8e0d7ef1f4a3fb97fbd82e11cd539093f58511f3 [diff] |
Handle non-int multichannel message IDs (#80) When running in wasm, a number in a `List` will be parsed as a `double`. On the web the `as int` cast succeeds, but in dart2wasm it fails. Cast to `num` and use `toInt()` to more reliably get an `int` value.
This package exposes the StreamChannel
interface, which represents a two-way communication channel. Each StreamChannel
exposes a Stream
for receiving data and a StreamSink
for sending it.
StreamChannel
helps abstract communication logic away from the underlying protocol. For example, the test
package re-uses its test suite communication protocol for both WebSocket connections to browser suites and Isolate connections to VM tests.
This package also contains utilities for dealing with StreamChannel
s and with two-way communications in general. For documentation of these utilities, see the API docs.