prependAnyOutgoing method
Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the callback. The listener is added to the beginning of the listeners array.
Note: acknowledgements sent to the server are not included.
@example
socket.prependAnyOutgoing((event, ...args) => {
console.log(sent event ${event}
);
});
@param listener
Implementation
Socket prependAnyOutgoing(AnyEventHandler handler) {
_anyOutgoingListeners.insert(0, handler);
return this;
}