handleDataMessage method

void handleDataMessage(
  1. DataMessage? data
)

Process a packet if the packet type is data

Implementation

void handleDataMessage(DataMessage? data) {
  if (data == null) {
    return;
  }

  onDataMessage.add(data);

  Topic? topic = _cacheManager.get('topic', data.topic ?? '');
  if (topic != null) {
    topic.routeData(data);
  }
}