Skip to content

Commit a48d179

Browse files
dev-scripttargos
authored andcommitted
doc: add options description for send APIs
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 <gpunathi@in.ibm.com>
1 parent dfb4a24 commit a48d179

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

doc/api/cluster.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ Workers will call `process.exit(0)` if the `'disconnect'` event occurs
456456
on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
457457
accidental disconnection.
458458

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

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

doc/api/process.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,11 @@ added: v0.5.9
19401940

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

0 commit comments

Comments
 (0)