Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add options description for process.send() and worker.send() #29868

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/api/cluster.md
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing from the signature above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mscdex thanks, i fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mscdex please can you give me some more idea about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @mscdex

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dev-313 - you need to modify the API signature at line 466 to add the options argument as well - like how did it for the worker.send API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gireeshpunathil please review now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. @mscdex - PTAL!

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
Expand Up @@ -1942,7 +1942,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