onAnyOutgoing method

Socket onAnyOutgoing(
  1. AnyEventHandler handler
)

Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the callback.

Note: acknowledgements sent to the server are not included.

@example socket.onAnyOutgoing((event, ...args) => { console.log(sent event ${event}); });

@param listener

Implementation

Socket onAnyOutgoing(AnyEventHandler handler) {
  _anyOutgoingListeners.add(handler);
  return this;
}