publish method

Future<int> publish(
  1. String channel,
  2. Object message
)

Posts a message to the given channel.

Returns the number of clients that received the message.

Implementation

Future<int> publish(String channel, Object message) async {
  return (await tier1.publish(channel, message)).toInteger().payload;
}