Worker Namespace


Sub-namespaces


Classes


IPC

constructor

With the help of this method you can create a new instance of IPC.

Signature

constructor(void) : Object|IPC

Returns

  • Object, IPC
    • A new instance of IPC

addBroadcastListener

Add an listener for an specific IPC broadcast request.

Signature

addBroadcastListener(String name, Function callback) : void

Parameters

  • name
    • Name of the broadcast message
    • Type: String
  • callback
    • Function to call on an given IPC broadcast request
    • Type: Function

request

Do an IPC request on the cluster master.

Signature

request(String method, Mixed args, [Function callback]) : void

Parameters

  • method
    • Name of the method
    • Type: String
  • args
    • Argument(s) to pass to the method, Objects are prefered
    • Type: Mixed
  • [callback]
    • Function to call on an given IPC response
    • Type: Function

call

Low-level call of Node.js process communication API. It simply wraps the "process.send()" method.

Signature

call(Object message) : void

Parameters

  • message
    • Message object to send
    • Type: Object