onMessageReceived method
Implementation
void onMessageReceived(DataPackage pkt) async
{
final cData = ChannelData<T>(
_mutator.getter(pkt),
DateTime.fromMillisecondsSinceEpoch(pkt.unixTimestampMs.toInt()),
pkt.sourceUserToken,
);
print("on message received");
if (_callback != null)
{
await _callback!(cData);
}
}