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).
6 files changed
tree: 0fccd5f4316b4063dfb983149f7da4530718700f
  1. example/
  2. lib/
  3. test/
  4. tool/
  5. .gitignore
  6. .travis.yml
  7. analysis_options.yaml
  8. AUTHORS
  9. CHANGELOG.md
  10. CONTRIBUTING.md
  11. LICENSE
  12. pubspec.yaml
  13. README.md
README.md

This package provides support for bi-directional communication through Server Sent Events and corresponding POST requests.