* Targets a room when emitting. * * @example * // the “foo” event will be broadcast to all connected clients in the “room-101” room * io.to("room-101").emit("foo", "bar"); * * // with an array of rooms (a client will be notified at most once) * io.to(["room-101", "room-102"]).em
(room: Room | Room[])
| 800 | * @return a new {@link BroadcastOperator} instance for chaining |
| 801 | */ |
| 802 | public to(room: Room | Room[]) { |
| 803 | return this.sockets.to(room); |
| 804 | } |
| 805 | |
| 806 | /** |
| 807 | * Targets a room when emitting. Similar to `to()`, but might feel clearer in some cases: |
no outgoing calls
no test coverage detected