Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

fromEventSource with custom events #119

Open
ErunamoJAZZ opened this issue Jun 15, 2016 · 1 comment
Open

fromEventSource with custom events #119

ErunamoJAZZ opened this issue Jun 15, 2016 · 1 comment

Comments

@ErunamoJAZZ
Copy link

ErunamoJAZZ commented Jun 15, 2016

Hello. We are using RxJs-DOM, and this library is amazing, but, we found a problem with fromEventSource implementation:

In EventSource specification, you could use custom events, by example:

event: userconnect
data: {"username": "bobby", "time": "02:33:48"}

event: usermessage
data: {"username": "bobby", "time": "02:34:11", "text": "Hi everyone."}

event: userdisconnect
data: {"username": "bobby", "time": "02:34:23"}

event: usermessage
data: {"username": "sean", "time": "02:34:36", "text": "Bye, bobby."}

But RxJs-DOM implementation is listening only default listener (message), so... is it possible add custom listener and not only one?, that use case will be really useful in some circumstances.

Thanks!

https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events

@jufmejiagu
Copy link

jufmejiagu commented Jun 15, 2016

Hi.
It is due to degradation of performance by adding more and more listeners?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants