rodgc/ngx-socket-io

How to emit to a room

Jasper-bot opened this issue · 5 comments

How do you emit an event to a room?

Using this.socket.to("a").emit("send-room-a"); it gives an error Property 'to' does not exist on type 'WrappedSocket'.

I have somewhat the same error with Emit

Room is not ye implemented as long as today,

Entering rooms functionality should be implemented at the server-side. E.g. you can have event join which you basically emit at the client side and listen for it at the server side (and then use the appropriate method to add user to a room according to socket.io framework you have chosen there).