* 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[])
| 353 | * @return a new {@link BroadcastOperator} instance for chaining |
| 354 | */ |
| 355 | public to(room: Room | Room[]) { |
| 356 | return this.newBroadcastOperator().to(room); |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * Targets a room when broadcasting. Similar to `to()`, but might feel clearer in some cases: |
nothing calls this directly
no test coverage detected