postMessage method

void postMessage(
  1. String channelName,
  2. SerializableEntity message, {
  3. bool global = false,
})

Posts a message to a named channel. If global is set to true, the message will be posted to all servers in the cluster, otherwise it will only be posted locally on the current server.

Implementation

void postMessage(
  String channelName,
  SerializableEntity message, {
  bool global = false,
}) {
  _session.server.messageCentral.postMessage(
    channelName,
    message,
    global: global,
  );
}