commit | 850b7bc3f512a65e81ec69687b98a527b12ebda0 | [log] [tgz] |
---|---|---|
author | Danny Tuppeny <danny@tuppeny.com> | Mon Jan 06 20:47:51 2020 +0000 |
committer | Gary Roumanis <groumanis@gmail.com> | Mon Jan 06 12:47:51 2020 -0800 |
tree | 0fccd5f4316b4063dfb983149f7da4530718700f | |
parent | a5e8d440f1becf505e916d28efe0a4a7693239a7 [diff] |
Support transparent reconnects on the server (#19) @grouma this is an attempt to fix #18 (may be easier to [view the diff ignoring whitespace](https://github.com/dart-lang/sse/pull/19/files?utf8=%E2%9C%93&diff=unified&w=1) since some code got indenting and makes the diff look much bigger than it is). However there is an exposed method here - `closeSink` that closes the underlying sink (in order to test - we can't close the exposed `sink` because it closes the stream controller that needs to continue to be used). I'm not sure if there's a better way (we can add `@visibleForTesting`, though `meta` isn't currently referenced here). Happy to make changes if this isn't what you had in mind (and I can test it end-to-end through dwds and GitPod to confirm it works prior to merging it).
This package provides support for bi-directional communication through Server Sent Events and corresponding POST requests.