Skip to content

Commit

Permalink
doc: add options description for send APIs
Browse files Browse the repository at this point in the history
Describes the meaning of the boolean return in process.send()
(doc/api/process.md) and worker.send() (doc/api/cluster.md) as
described in subprocess.send() (doc/api/child_process.md)

Fixes: #26995
PR-URL: #29868
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
dev-script authored and targos committed Nov 11, 2019
1 parent d0f5bc1 commit 98d31da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ Workers will call `process.exit(0)` if the `'disconnect'` event occurs
on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
accidental disconnection.

### worker.send(message\[, sendHandle\]\[, callback\])
### worker.send(message\[, sendHandle\[, options\]\]\[, callback\])
<!-- YAML
added: v0.7.0
changes:
Expand All @@ -467,6 +467,12 @@ changes:

* `message` {Object}
* `sendHandle` {Handle}
* `options` {Object} The `options` argument, if present, is an object used to
parameterize the sending of certain types of handles. `options` supports
the following properties:
* `keepOpen` {boolean} A value that can be used when passing instances of
`net.Socket`. When `true`, the socket is kept open in the sending process.
**Default:** `false`.
* `callback` {Function}
* Returns: {boolean}

Expand Down
6 changes: 5 additions & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,11 @@ added: v0.5.9

* `message` {Object}
* `sendHandle` {net.Server|net.Socket}
* `options` {Object}
* `options` {Object} used to parameterize the sending of certain types of
handles.`options` supports the following properties:
* `keepOpen` {boolean} A value that can be used when passing instances of
`net.Socket`. When `true`, the socket is kept open in the sending process.
**Default:** `false`.
* `callback` {Function}
* Returns: {boolean}

Expand Down

0 comments on commit 98d31da

Please sign in to comment.