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

Method emitEvent

packages/socket.io-client/lib/socket.ts:767–778  ·  view source on GitHub ↗
(args: ReadonlyArray<any>)

Source from the content-addressed store, hash-verified

765 }
766
767 private emitEvent(args: ReadonlyArray<any>): void {
768 if (this._anyListeners && this._anyListeners.length) {
769 const listeners = this._anyListeners.slice();
770 for (const listener of listeners) {
771 listener.apply(this, args);
772 }
773 }
774 super.emit.apply(this, args);
775 if (this._pid && args.length && typeof args[args.length - 1] === "string") {
776 this._lastOffset = args[args.length - 1];
777 }
778 }
779
780 /**
781 * Produces an ack callback to emit with an event.

Callers 2

oneventMethod · 0.95
emitBufferedMethod · 0.95

Calls 1

applyMethod · 0.80

Tested by

no test coverage detected