* Targets a room when broadcasting. * * @example * io.on("connection", (socket) => { * // the “foo” event will be broadcast to all connected clients in the “room-101” room, except this socket * socket.to("room-101").emit("foo", "bar"); * * // the code above is equivalent t
(room: Room | Room[])
| 446 | * @return a new {@link BroadcastOperator} instance for chaining |
| 447 | */ |
| 448 | public to(room: Room | Room[]) { |
| 449 | return this.newBroadcastOperator().to(room); |
| 450 | } |
| 451 | |
| 452 | /** |
| 453 | * Targets a room when broadcasting. Similar to `to()`, but might feel clearer in some cases: |
nothing calls this directly
no test coverage detected