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 _getInteger(await _execCmd(['PUBLISH', channel, message]));
}