Support transparent reconnects on the server (#19)

@grouma this is an attempt to fix #18 (may be easier to [view the diff ignoring whitespace]( 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
  12. pubspec.yaml

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