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

Function delSockets

packages/socket.io-adapter/lib/cluster-adapter.ts:530–548  ·  view source on GitHub ↗
(opts: BroadcastOptions, rooms: Room[])

Source from the content-addressed store, hash-verified

528 }
529
530 override async delSockets(opts: BroadcastOptions, rooms: Room[]) {
531 const onlyLocal = opts.flags?.local;
532
533 if (!onlyLocal) {
534 try {
535 await this.publishAndReturnOffset({
536 type: MessageType.SOCKETS_LEAVE,
537 data: {
538 opts: encodeOptions(opts),
539 rooms,
540 },
541 });
542 } catch (e) {
543 debug("[%s] error while publishing message: %s", this.uid, e.message);
544 }
545 }
546
547 super.delSockets(opts, rooms);
548 }
549
550 override async disconnectSockets(opts: BroadcastOptions, close: boolean) {
551 const onlyLocal = opts.flags?.local;

Callers

nothing calls this directly

Calls 3

encodeOptionsFunction · 0.85
debugFunction · 0.85
delSocketsMethod · 0.80

Tested by

no test coverage detected