sendMessage method
- O data, [
- 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));
}