onMessage method
- I data, [
- Channel channel = kAnyChannel
Implementation
void onMessage(I data, [Channel channel = kAnyChannel]) {
final result = decodeChannel(data, channel);
if (result == null) return;
final (rawData, rawChannel) = result;
_readController.add(NetworkerPacket(rawData, rawChannel));
for (final plugin in _pipes.keys) {
try {
plugin.onMessage(rawData, rawChannel);
} catch (_) {}
}
}