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

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