subEvents method

void subEvents()

Subscribe to open, close and packet events

@api private

Implementation

void subEvents() {
  if (subs!.isNotEmpty == true) return;

  Manager io = this.io;
  subs = [
    util.on(io, 'open', onopen),
    util.on(io, 'packet', onpacket),
    util.on(io, 'close', onclose)
  ];
}