MCPcopy
hub / github.com/socketio/socket.io / in

Method in

packages/socket.io/lib/socket.ts:371–373  ·  view source on GitHub ↗

* Targets a room when broadcasting. Similar to `to()`, but might feel clearer in some cases: * * @example * io.on("connection", (socket) => { * // disconnect all clients in the "room-101" room, except this socket * socket.in("room-101").disconnectSockets(); * }); * * @par

(room: Room | Room[])

Source from the content-addressed store, hash-verified

369 * @return a new {@link BroadcastOperator} instance for chaining
370 */
371 public in(room: Room | Room[]) {
372 return this.newBroadcastOperator().in(room);
373 }
374
375 /**
376 * Excludes a room when broadcasting.

Callers

nothing calls this directly

Calls 1

newBroadcastOperatorMethod · 0.95

Tested by

no test coverage detected