socketio / socket.io-redis-emitter

The Socket.IO Redis emitter, allowing to communicate with a group of Socket.IO servers from another Node.js process.
https://socket.io/docs/v4/redis-adapter/
MIT License
721 stars 121 forks source link

Emit to all rooms, when you want to emit only a certain room #37

Closed betimer closed 8 years ago

betimer commented 8 years ago

When I try to do the emit to a certain room: emitter.to(room).broadcast.emit('my-signal', data);

It turns out that the emitter ignores the room, and just emit to all clients.

betimer commented 8 years ago

Tested looks fine, I think it's my code issue. Going to close this.

fazelit commented 3 years ago

When I try to do the emit to a certain room: emitter.to(room).broadcast.emit('my-signal', data);

It turns out that the emitter ignores the room, and just emit to all clients.

i use your code but error: TypeError: Cannot read property 'emit' of undefined

version : -> "@socket.io/redis-emitter": "^4.1.0",