You are here

function nodejs_get_socketio_js_config in Node.js integration 6

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

Return the path to the socket.io client js.

1 call to nodejs_get_socketio_js_config()
nodejs_init in ./nodejs.module
Implements hook_init().

File

./nodejs.module, line 217

Code

function nodejs_get_socketio_js_config($nodejs_config) {
  $socket_io_config = array(
    'path' => variable_get('nodejs_socket_io_path', FALSE),
    'type' => variable_get('nodejs_socket_io_type', 'external'),
  );
  if (!$socket_io_config['path']) {
    $socket_io_config['path'] = $nodejs_config['scheme'] . '://' . $nodejs_config['host'] . ':' . $nodejs_config['port'] . $nodejs_config['resource'] . '/socket.io.js';
  }
  return $socket_io_config;
}