Add framework for SSE support (replaces #3) #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for SSE to the WHEP library, thus replacing the old #3.
It takes a different approach. The old PR tried to do everything: not only dealing with SSE, but also monitoring resources to autonomously decide what to notify and when. I decided to change that, and now the library only provides a framework to advertise SSE support, and negotiate what to notify about via SSE. It then leaves the burden of actually pushing events to notify up to the application.
The demos come with a simple example of how to notify the count of viewers (
viewercount
), since the application is aware of that. The web demo has been updated to visually show the content of SSE events as well, which should make it easy to test.Considering there are a couple of changes, the version will be bumped to
1.1.0
when this is merged.