onData method
Processes the incoming data payload.
Implementation
@override
void onData(data) {
if (messageHandler != null) {
messageHandler!.handle(this, data);
} else {
var self = this;
callback(packet, [foo, bar]) {
if ('close' == packet['type']) {
self.onClose();
return false;
}
self.onPacket(packet);
return true;
}
PacketParser.decodePayload(data, callback: callback);
}
}