pub repository
mirror.p-hatan.irstream_channel
1.6.1An abstraction for two-way communication channels.
Readme
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 StreamChannels and with
two-way communications in general. For documentation of these utilities, see
the API docs.
Changelog
1.6.1
- Fix the type of
StreamChannel.transform(). This previously inverted the generic parameters, so it only really worked with transformers where both generic types were identical.
1.6.0
Disconnector.disconnect()now returns a future that completes when all the innerStreamSink.close()futures have completed.
1.5.0
-
Add
new StreamChannel.withCloseGuarantee()to provide the specific guarantee that closing the sink causes the stream to close before it emits any more events. This is the only guarantee that isn't automatically preserved when transforming a channel. -
StreamChannelTransformers provided by thestream_channelpackage now properly provide the guarantee that closing the sink causes the stream to close before it emits any more events
1.4.0
-
Add
StreamChannel.cast(), which soundly coerces the generic type of a channel. -
Add
StreamChannelTransformer.typed(), which soundly coerces the generic type of a transformer.
1.3.2
- Fix all strong-mode errors and warnings.
1.3.1
-
Make
IsolateChannelslightly more efficient. -
Make
MultiChannelfollow the stream channel rules.
1.3.0
- Add
Disconnector, a transformer that allows the caller to disconnect the transformed channel.
1.2.0
-
Add
new StreamChannel.withGuarantees(), which creates a channel with extra wrapping to ensure that it obeys the stream channel guarantees. -
Add
StreamChannelController, which can be used to create customStreamChannelobjects.
1.1.1
- Fix the type annotation for
StreamChannel.transform()'s parameter.
1.1.0
-
Add
StreamChannel.transformStream(),StreamChannel.transformSink(),StreamChannel.changeStream(), andStreamChannel.changeSink()to support changing only the stream or only the sink of a channel. -
Be more explicit about
JsonDocumentTransformer's error-handling behavior.
1.0.1
- Fix
MultiChannel's constructor to take aStreamChannel. This is technically a breaking change, but since 1.0.0 was only released an hour ago, we're treating it as a bug fix.
1.0.0
- Initial version
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add stream_channelpubspec.yaml
name: stream_channel
version: 1.6.1
description: An abstraction for two-way communication channels.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/stream_channel
environment:
sdk: '>=1.8.0 <2.0.0'
dependencies:
async: '^1.11.0'
stack_trace: '^1.0.0'
dev_dependencies:
test: '^0.12.0'
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | 2016-01-28T21:04:43.506Z | Download | 01617fee7708143790930c067a8a7cbf7e6c5504c4682a440aa89e73574c8147 |
| 1.0.1 | 2016-01-28T22:10:33.039Z | Download | 89522e27cfccc165c5c087db0841e4033760a368264c042fa6e974c6b8a6a663 |
| 1.1.0 | 2016-02-01T23:56:53.854Z | Download | 52bfbfd60a6e3eec7d291c44e6d744d540ca806c1d229716c8314ee5a0144b9d |
| 1.1.1 | 2016-02-02T01:30:13.406Z | Download | 4dcfaa3e6452761949abc57bb511a15099c8e638fcc4e08c770016a25fdacd73 |
| 1.2.0 | 2016-02-09T00:12:15.746Z | Download | 88e47a862967c6c6860900d583c5c5706b477f0082da98cabaa4f2dce8b0fa17 |
| 1.3.0 | 2016-02-09T19:12:04.222Z | Download | 1091a33039fb90a94afdcb78914e12ef14308e1654bfdbd0585630aea41acb79 |
| 1.3.1 | 2016-02-10T22:26:55.301Z | Download | d3f060a99e483bd713ac360f9d2d8a2794e66b9f99445cacbe580ddfbccd383a |
| 1.3.2 | 2016-05-10T21:59:27.428Z | Download | a64de62410892c5ff9252f1ea3988179a7966e5ff8081e19d6739cc1efe867f5 |
| 1.4.0 | 2016-05-10T22:42:44.882Z | Download | 3047bd22628b0293778d9025b04f8cf4004eacff40fb88240c955261e552ab4e |
| 1.5.0 | 2016-06-06T23:35:31.398Z | Download | 3cbe42486c5bdb01a366da46bc41903f650018a54825b69ff5ec63a991b8fa72 |
| 1.6.0 | 2017-01-19T21:43:44.123Z | Download | e22242ac461247618190a50342c3cd93a2466746637e55201375ccb4654cd420 |
| 1.6.1 | 2017-01-25T23:02:22.896Z | Download | 0074d17086ea5a5594cb0a1d00bc050358d4ebdbfe4018cceb5f9ea1e1ae1dec |
| 1.6.2 | 2017-09-22T20:44:31.253259Z | Download | 7156056584e7e6923149ff0e5f64c39d709a2fd9d3225fb22c224ca5a579ab00 |
| 1.6.3 | 2017-12-19T21:16:17.357527Z | Download | 770e484e504809cbc798131f65bff86910e8c1d2db96dcafbdd9b9a321bdd985 |
| 1.6.4 | 2018-02-27T22:59:39.727560Z | Download | 3b464d18985d2106486e2ab70efb10a31236112383acebef53319bbf1610352a |
| 1.6.5 | 2018-04-16T23:51:07.010337Z | Download | a5524d305d882cd2caad69037eb2966eebda6768e7a0a2c50792ae8e3c2a7ef5 |
| 1.6.6 | 2018-05-02T19:52:34.317726Z | Download | 2735d14671a507bb7cb29f1216a7f5db17797e01f6226c4a6a40ec1f90bad5ff |
| 1.6.7 | 2018-06-08T22:52:28.180083Z | Download | 3b4f81dd66b890a3e9fa6d2e24962983522f025135608ea0de0e4dee0202e422 |
| 1.6.7+1 | 2018-06-12T17:55:26.762448Z | Download | caa7524b2843c3076f1ef2c2f1b3bf61369a27f8f3856740ddb68f6aa4fa9361 |
| 1.6.8 | 2018-07-18T23:28:30.590646Z | Download | 44b3c91515cc59a980c3abcf1efc3a3a22fff117f630e839814620f138182353 |
| 1.7.0 | 2019-03-26T22:39:10.762981Z | Download | bdd37d07673c55eca91ebd2492e7d231072fb9cd4d9d3ccf118ffca0112182d4 |
| 2.0.0 | 2019-03-28T19:48:16.901152Z | Download | dbef035a538c399e43f6e91080514a7a686e56c5c011dabbc85506247bbdb228 |
| 2.1.0-nullsafety | 2020-07-29T17:43:05.103268Z | Download | 375222ffba005583343a812041b4eb4be165dc3923f11e9e6fe2e5833e820d77 |
| 2.1.0-nullsafety.1 | 2020-09-22T16:18:16.600527Z | Download | 9f07d7f5b54084ffd9aaaa12e179ceb4d74843e8412ee5dbbaac20227e5ee5fe |
| 2.1.0-nullsafety.2 | 2020-10-23T21:34:26.693800Z | Download | cf55b249b98bed5497933571a4fe0884474dd11d060d622012cdf18b73f13755 |
| 2.1.0-nullsafety.3 | 2020-11-03T22:33:42.445616Z | Download | cb567550a1c72c863aaa603a22da07d02079dd48fffbd020ba321a323d529e3a |
| 2.1.0 | 2021-02-02T21:31:41.115254Z | Download | db47e4797198ee601990820437179bb90219f918962318d494ada2b4b11e6f6d |
| 2.1.1 | 2022-09-21T19:32:22.001236Z | Download | 83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8 |
| 2.1.2 | 2023-06-22T22:43:26.506522Z | Download | ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 |
| 2.1.3 | 2024-12-20T13:35:07.909288Z | Download | 4ac0537115a24d772c408a2520ecd0abb99bca2ea9c4e634ccbdbfae64fe17ec |
| 2.1.4 | 2025-01-07T16:38:32.361753Z | Download | 969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d |
Dependencies
async "^1.11.0"
stack_trace "^1.0.0"