Skip to content

Commit

Permalink
doc: link cluster worker.send() to child.send()
Browse files Browse the repository at this point in the history
PR-URL: #839
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
  • Loading branch information
sam-github authored and brendanashworth committed Feb 25, 2015
1 parent 872702d commit 87e4bfd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/api/cluster.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,13 @@ exit, the master may choose not to respawn a worker based on this value.
* `message` {Object}
* `sendHandle` {Handle object}

This function is equal to the send methods provided by
`child_process.fork()`. In the master you should use this function to
send a message to a specific worker.
Send a message to a worker or master, optionally with a handle.

In a worker you can also use `process.send(message)`, it is the same function.
In the master this sends a message to a specific worker. It is identical to
[child.send()](child_process.html#child_process_child_send_message_sendhandle).

In a worker this sends a message to the master. It is identical to
`process.send()`.

This example will echo back all messages from the master:

Expand Down

0 comments on commit 87e4bfd

Please sign in to comment.