RocketChat / meteor-streamer

2 way communication over DDP with better performance.
MIT License
82 stars 27 forks source link

No way to remove a listener #3

Open mitar opened 8 years ago

mitar commented 8 years ago

It seems there is no way to remove a listener?

If I understand correctly, events are send only to those clients which are listening for a particular event type? So if you want to stop listening to some event type, this is not possible at the moment?

sampaiodiego commented 8 years ago

you can call unsubscribe() to remove a listener

mitar commented 8 years ago

Is this documented/official API?

Micjoyce commented 8 years ago

@sampaiodiego I have use unsubscribe to stop listener, and I found streamer.subscriptions has been remove, but I use google develop tool to see the websocket data stream and I found I stop subscriptions still get data from server.

2016-08-19 10 24 46

It seem not realy unsubscription the listener.

Micjoyce commented 8 years ago

I found the way to kill subs, just stop(eventName) .

reyalpsirc commented 6 years ago

@Micjoyce is it possible to call that stop(eventName) on through websocket/DDP ?

sampaiodiego commented 6 years ago

you guys might want have a look at https://github.com/RocketChat/meteor-streamer/pull/31