Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transport: server-sent events #590

Open
1 of 2 tasks
jntesteves opened this issue Sep 26, 2019 · 3 comments
Open
1 of 2 tasks

Add transport: server-sent events #590

jntesteves opened this issue Sep 26, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jntesteves
Copy link

jntesteves commented Sep 26, 2019

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

The transports available are http polling and websocket.

Steps to reproduce (if the current behaviour is a bug)

N/A

Expected behaviour

To have the option of a new transport available: sse (server-sent events)

Setup

  • OS: Any
  • browser: Any (Edge requires a polyfill)
  • engine.io version: 3.4.0

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Server-sent events have existed for many years now as an option to push events from the server to the browser [1]. It is the ideal mechanism for some use-cases and has the potential to greatly save on power usage on mobile devices [2]. This is the sole transport used by Mercure [3], a new protocol for real-time communications that I believe might become a direct competitor to Socket.io.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
[2] https://www.smashingmagazine.com/2018/02/sse-websockets-data-flow-http2/
[3] https://github.com/dunglas/mercure

@sergejostir
Copy link

There were PRs opened to add this years ago, but they never got merged.
socketio/socket.io#732
socketio/socket.io-client#378

Probably a good starting point to make a transport for current version.

@Leo-Mu
Copy link

Leo-Mu commented Jun 22, 2020

Yes! This is a much-needed feature.

@darrachequesne darrachequesne added the enhancement New feature or request label Sep 15, 2020
@mrfelfel
Copy link

related to #614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants