ChannelMessage.inbound constructor
ChannelMessage.inbound(
- String channel,
- dynamic payload, {
- int? sequence,
- ChannelMessageType type = ChannelMessageType.message,
Create an inbound (server-to-client) message
Implementation
factory ChannelMessage.inbound(
String channel,
dynamic payload, {
int? sequence,
ChannelMessageType type = ChannelMessageType.message,
}) {
return ChannelMessage(
id: _generateId(),
channel: channel,
direction: ChannelMessageDirection.serverToClient,
type: type,
payload: payload,
timestamp: DateTime.now(),
sequence: sequence,
);
}