commit | 627edcf97d854e9ccdcd526e839ce867e92554a6 | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Thu Mar 28 08:26:01 2019 -0700 |
committer | GitHub <noreply@github.com> | Thu Mar 28 08:26:01 2019 -0700 |
tree | 25f3858e9ee63656424b5fe5287ae1f00f33724e | |
parent | 3d17c733ca4d6f61bbc38d6f6aedf7253fc18b62 [diff] |
Hide JsonDocumentTransformer (#43) Closes #34 This was only used through the top level variable `jsonDocument` and no use cases have surfaced for being able to pass a `reviver` or `toEncodable` callback. This implementation does not use `StreamChannelTransformer.fromCodec` with a `JsonCodec` since the encoder and decoder are not 1:1. - Remove the `JsonCodec` field and use `jsonEncode` and `jsonDecode` calls directly. - Move the detailed doc to `jsonDocument`. - Make the class private. - Remove the tests constructing the class directly.
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.