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: correct dgram's Socket.bind required args #11025

Closed
wants to merge 1 commit into from

Conversation

strugee
Copy link
Contributor

@strugee strugee commented Jan 26, 2017

port was listed as required, but as described in the following paragraphs, it's actually not.

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

@nodejs-github-bot nodejs-github-bot added dgram Issues and PRs related to the dgram subsystem / UDP. doc Issues and PRs related to the documentations. lts-watch-v6.x labels Jan 26, 2017
@@ -159,7 +159,7 @@ added: v0.11.14
-->

* `options` {Object} - Required. Supports the following properties:
* `port` {Number} - Required.
* `port` {Number} - Optional.
Copy link
Contributor

Choose a reason for hiding this comment

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

I know its not your text, but could you add after

If port is not specified

"or is 0"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sam-github 👍 just pushed a fix

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, socket.bind(port) and socket.bind(options) have cut-n-pasted docs, so you need to change in both places (or document the number variant by referring to the options variant).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sam-github pushed another fix. As a bonus I synced up some additional information that was missing from the options form.

@@ -159,7 +159,7 @@ added: v0.11.14
-->

* `options` {Object} - Required. Supports the following properties:
* `port` {Number} - Required.
* `port` {Number} - Optional.
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, socket.bind(port) and socket.bind(options) have cut-n-pasted docs, so you need to change in both places (or document the number variant by referring to the options variant).

`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.
@strugee
Copy link
Contributor Author

strugee commented Jan 31, 2017

@sam-github ping - this should be good to merge, no?

@sam-github
Copy link
Contributor

Landed in 89e40c1, thanks.

@sam-github sam-github closed this Jan 31, 2017
sam-github pushed a commit that referenced this pull request Jan 31, 2017
`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.

PR-URL: #11025
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 31, 2017
`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.

PR-URL: #11025
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@strugee strugee deleted the patch-1 branch February 1, 2017 00:47
jasnell pushed a commit that referenced this pull request Mar 7, 2017
`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.

PR-URL: #11025
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit that referenced this pull request Mar 7, 2017
`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.

PR-URL: #11025
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.

PR-URL: #11025
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
`port` was listed as required, but as described in the following
paragraphs, it's actually not.

Also, note that setting `port` to `0` will also cause the OS to assign a
a random port and sync up the docs of both forms.

PR-URL: #11025
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dgram Issues and PRs related to the dgram subsystem / UDP. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants