{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/22556","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/22556/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/22556/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/22556/events","html_url":"https://github.com/dart-lang/sdk/issues/22556","id":84597539,"number":22556,"title":"Provide a two-way communication abstraction","user":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-library","name":"area-library","color":"c7def8"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/library-async","name":"library-async","color":"d4c5f9"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type:%20enhancement","name":"Type: enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-24T21:28:44Z","updated_at":"2016-03-16T19:06:43Z","closed_at":"2016-03-16T19:06:43Z","body":"It would be really nice if dart:async provided some sort of abstraction for two-way communication. This pattern comes up often when doing browser development; WebSockets, postMessage, and MessageChannels all match it. It  could be as simple as:\n\nabstract class Channel&lt;T&gt; {\n&nbsp;&nbsp;Stream&lt;T&gt; out;\n&nbsp;&nbsp;StreamSink&lt;T&gt; in;\n}\n\nor even:\n\nabstract class Channel&lt;T&gt; extends Stream&lt;T&gt;, StreamSink&lt;T&gt; {}\n\nThe point is that having a consistent interface for this makes it possible to build components that use and compose them in an abstract way."},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/197494080","html_url":"https://github.com/dart-lang/sdk/issues/22556#issuecomment-197494080","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/22556","id":197494080,"user":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T19:06:43Z","updated_at":"2016-03-16T19:06:43Z","body":"This is now covered by [the `stream_channel` package](/dart-lang/stream_channel)."}}