p-hatan/ mirror

pub repository

mirror.p-hatan.ir

stream_channel

1.6.2

An abstraction for two-way communication channels.

Download archive

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.2

  • Declare support for async 2.0.0.

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 inner StreamSink.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 the stream_channel package 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 IsolateChannel slightly more efficient.

  • Make MultiChannel follow 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 custom StreamChannel objects.

1.1.1

  • Fix the type annotation for StreamChannel.transform()'s parameter.

1.1.0

  • Add StreamChannel.transformStream(), StreamChannel.transformSink(), StreamChannel.changeStream(), and StreamChannel.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 a StreamChannel. 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_channel
pubspec.yaml
name: stream_channel
version: 1.6.2
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.21.0 <2.0.0'
dependencies:
  async: '>=1.11.0 <3.0.0'
  stack_trace: '^1.0.0'
dev_dependencies:
  test: '^0.12.18'

Version history

VersionPublishedArchiveSHA-256
1.0.02016-01-28T21:04:43.506ZDownload01617fee7708143790930c067a8a7cbf7e6c5504c4682a440aa89e73574c8147
1.0.12016-01-28T22:10:33.039ZDownload89522e27cfccc165c5c087db0841e4033760a368264c042fa6e974c6b8a6a663
1.1.02016-02-01T23:56:53.854ZDownload52bfbfd60a6e3eec7d291c44e6d744d540ca806c1d229716c8314ee5a0144b9d
1.1.12016-02-02T01:30:13.406ZDownload4dcfaa3e6452761949abc57bb511a15099c8e638fcc4e08c770016a25fdacd73
1.2.02016-02-09T00:12:15.746ZDownload88e47a862967c6c6860900d583c5c5706b477f0082da98cabaa4f2dce8b0fa17
1.3.02016-02-09T19:12:04.222ZDownload1091a33039fb90a94afdcb78914e12ef14308e1654bfdbd0585630aea41acb79
1.3.12016-02-10T22:26:55.301ZDownloadd3f060a99e483bd713ac360f9d2d8a2794e66b9f99445cacbe580ddfbccd383a
1.3.22016-05-10T21:59:27.428ZDownloada64de62410892c5ff9252f1ea3988179a7966e5ff8081e19d6739cc1efe867f5
1.4.02016-05-10T22:42:44.882ZDownload3047bd22628b0293778d9025b04f8cf4004eacff40fb88240c955261e552ab4e
1.5.02016-06-06T23:35:31.398ZDownload3cbe42486c5bdb01a366da46bc41903f650018a54825b69ff5ec63a991b8fa72
1.6.02017-01-19T21:43:44.123ZDownloade22242ac461247618190a50342c3cd93a2466746637e55201375ccb4654cd420
1.6.12017-01-25T23:02:22.896ZDownload0074d17086ea5a5594cb0a1d00bc050358d4ebdbfe4018cceb5f9ea1e1ae1dec
1.6.22017-09-22T20:44:31.253259ZDownload7156056584e7e6923149ff0e5f64c39d709a2fd9d3225fb22c224ca5a579ab00
1.6.32017-12-19T21:16:17.357527ZDownload770e484e504809cbc798131f65bff86910e8c1d2db96dcafbdd9b9a321bdd985
1.6.42018-02-27T22:59:39.727560ZDownload3b464d18985d2106486e2ab70efb10a31236112383acebef53319bbf1610352a
1.6.52018-04-16T23:51:07.010337ZDownloada5524d305d882cd2caad69037eb2966eebda6768e7a0a2c50792ae8e3c2a7ef5
1.6.62018-05-02T19:52:34.317726ZDownload2735d14671a507bb7cb29f1216a7f5db17797e01f6226c4a6a40ec1f90bad5ff
1.6.72018-06-08T22:52:28.180083ZDownload3b4f81dd66b890a3e9fa6d2e24962983522f025135608ea0de0e4dee0202e422
1.6.7+12018-06-12T17:55:26.762448ZDownloadcaa7524b2843c3076f1ef2c2f1b3bf61369a27f8f3856740ddb68f6aa4fa9361
1.6.82018-07-18T23:28:30.590646ZDownload44b3c91515cc59a980c3abcf1efc3a3a22fff117f630e839814620f138182353
1.7.02019-03-26T22:39:10.762981ZDownloadbdd37d07673c55eca91ebd2492e7d231072fb9cd4d9d3ccf118ffca0112182d4
2.0.02019-03-28T19:48:16.901152ZDownloaddbef035a538c399e43f6e91080514a7a686e56c5c011dabbc85506247bbdb228
2.1.0-nullsafety2020-07-29T17:43:05.103268ZDownload375222ffba005583343a812041b4eb4be165dc3923f11e9e6fe2e5833e820d77
2.1.0-nullsafety.12020-09-22T16:18:16.600527ZDownload9f07d7f5b54084ffd9aaaa12e179ceb4d74843e8412ee5dbbaac20227e5ee5fe
2.1.0-nullsafety.22020-10-23T21:34:26.693800ZDownloadcf55b249b98bed5497933571a4fe0884474dd11d060d622012cdf18b73f13755
2.1.0-nullsafety.32020-11-03T22:33:42.445616ZDownloadcb567550a1c72c863aaa603a22da07d02079dd48fffbd020ba321a323d529e3a
2.1.02021-02-02T21:31:41.115254ZDownloaddb47e4797198ee601990820437179bb90219f918962318d494ada2b4b11e6f6d
2.1.12022-09-21T19:32:22.001236ZDownload83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8
2.1.22023-06-22T22:43:26.506522ZDownloadba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
2.1.32024-12-20T13:35:07.909288ZDownload4ac0537115a24d772c408a2520ecd0abb99bca2ea9c4e634ccbdbfae64fe17ec
2.1.42025-01-07T16:38:32.361753ZDownload969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d

Dependencies

async "\u003e=1.11.0 \u003c3.0.0"

stack_trace "^1.0.0"