commit | c702d4eb3223a194606dcec0acfbb0761bce867c | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Tue Jun 12 10:53:40 2018 -0700 |
committer | GitHub <noreply@github.com> | Tue Jun 12 10:53:40 2018 -0700 |
tree | 8de3d8e6ca222f17b1bfacd76248512975396c61 | |
parent | 863546aeae43379860eb33a906bfd094e61385bb [diff] |
Cast streams to correct types in IsolateChannel (#31) Fixes #29 - Add a type on the IsolateChannel in one of the tests so that it exhibits the problem when run in Dart 2 mode. - Cast the streams coming from the ReceivePort instances to the appropriate types since ReceivePort is always `Stream<dynamic>`. - Remove the type on the subscription variable since it's a subscription on a dynamic stream and otherwise would never have the correct type.
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.