You are here

public static function Nodejs::sendContentTokenMessage in Node.js integration 7

Same name and namespace in other branches
  1. 6 nodejs.module \Nodejs::sendContentTokenMessage()
1 call to Nodejs::sendContentTokenMessage()
nodejs_send_content_channel_message in ./nodejs.module
Send a content change message to a content channel.

File

./nodejs.module, line 900

Class

Nodejs

Code

public static function sendContentTokenMessage($message) {
  $message->clientSocketId = nodejs_get_client_socket_id();
  drupal_alter('nodejs_content_channel_message', $message);
  $options = array(
    'method' => 'POST',
    'data' => drupal_json_encode($message),
    'options' => array(
      'timeout' => 5.0,
    ),
  );
  return self::httpRequest('nodejs/content/token/message', $options);
}