emit method

  1. @override
void emit(
  1. String event, [
  2. dynamic argument
])
override

Emits to all clients.

Implementation

@override
void emit(String event, [dynamic argument]) {
  if (events.contains(event)) {
    super.emit(event, argument);
  } else {
    List data = argument == null ? [event] : [event, argument];
    final packet = {'type': eventValue, 'data': data};
    adapter.broadcast(packet, {'rooms': rooms, 'flags': flags});
    rooms = [];
    flags = {};
  }
}