ngx-socket-io icon indicating copy to clipboard operation
ngx-socket-io copied to clipboard

How to emit to a room

Open Jasper-bot opened this issue 3 years ago • 3 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'.

Jasper-bot avatar Mar 21 '22 10:03 Jasper-bot

I have somewhat the same error with Emit

ferraridk avatar Apr 18 '22 14:04 ferraridk

Room is not ye implemented as long as today,

robmanganelly avatar Apr 25 '22 23:04 robmanganelly

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).

ryzhovalex avatar Jun 09 '22 13:06 ryzhovalex