MCPcopy Index your code
hub / github.com/socketio/socket.io / onAny

Method onAny

lib/socket.ts:1043–1047  ·  view source on GitHub ↗

* Adds a listener that will be fired when any event is received. The event name is passed as the first argument to * the callback. * * @example * io.on("connection", (socket) => { * socket.onAny((event, ...args) => { * console.log(`got event ${event}`); * }); * });

(listener: (...args: any[]) => void)

Source from the content-addressed store, hash-verified

1041 * @param listener
1042 */
1043 public onAny(listener: (...args: any[]) => void): this {
1044 this._anyListeners = this._anyListeners || [];
1045 this._anyListeners.push(listener);
1046 return this;
1047 }
1048
1049 /**
1050 * Adds a listener that will be fired when any event is received. The event name is passed as the first argument to

Callers 2

socket.tsFile · 0.45
socket.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected