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

Method except

packages/socket.io/lib/socket.ts:394–396  ·  view source on GitHub ↗

* Excludes a room when broadcasting. * * @example * io.on("connection", (socket) => { * // the "foo" event will be broadcast to all connected clients, except the ones that are in the "room-101" room * // and this socket * socket.except("room-101").emit("foo", "bar"); *

(room: Room | Room[])

Source from the content-addressed store, hash-verified

392 * @return a new {@link BroadcastOperator} instance for chaining
393 */
394 public except(room: Room | Room[]) {
395 return this.newBroadcastOperator().except(room);
396 }
397
398 /**
399 * Sends a `message` event.

Callers

nothing calls this directly

Calls 1

newBroadcastOperatorMethod · 0.95

Tested by

no test coverage detected