You are here

function nodejs_get_client_socket_id in Node.js integration 7

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

Get the client socket id associated with this request.

2 calls to nodejs_get_client_socket_id()
Nodejs::sendContentTokenMessage in ./nodejs.module
Nodejs::sendMessage in ./nodejs.module

File

./nodejs.module, line 779

Code

function nodejs_get_client_socket_id() {
  $client_socket_id = isset($_POST['nodejs_client_socket_id']) ? $_POST['nodejs_client_socket_id'] : '';
  return preg_match('/^[0-9a-z_-]+$/i', $client_socket_id) ? $client_socket_id : '';
}