onData method

void onData(
  1. dynamic data
)

Implementation

void onData(data) {
  if (messageHandler != null) {
    messageHandler!.handle(this, data);
  } else {
    onPacket(PacketParser.decodePacket(data, utf8decode: true));
  }
}