You are here

function nodejs_enqueue_message in Node.js integration 8

Same name and namespace in other branches
  1. 6 nodejs.module \nodejs_enqueue_message()
  2. 7 nodejs.module \nodejs_enqueue_message()

Enqueue a message for sending at the end of the request.

Parameters

StdClass $message:

3 calls to nodejs_enqueue_message()
nodejs_broadcast_message in ./nodejs.module
Broadcast a message to all clients.
nodejs_send_channel_message in ./nodejs.module
Send a message to all users subscribed to a given channel.
nodejs_send_user_message in ./nodejs.module
Send a message to given user.

File

./nodejs.module, line 433

Code

function nodejs_enqueue_message(StdClass $message) {
  $message->broadcast = isset($message->broadcast) ? $message->broadcast : FALSE;
  nodejs_get_nodejs()
    ->enqueueMessage($message);
}