sendMessage method

void sendMessage(
  1. O data, [
  2. Channel channel = kAnyChannel
])

Implementation

void sendMessage(O data, [Channel channel = kAnyChannel]) {
  final result = encodeChannel(data, channel);
  if (result == null) return;
  final (rawData, rawChannel) = result;
  _writeController.add(NetworkerPacket(rawData, rawChannel));
}