-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Conversation
@@ -159,7 +159,7 @@ added: v0.11.14 | |||
--> | |||
|
|||
* `options` {Object} - Required. Supports the following properties: | |||
* `port` {Number} - Required. | |||
* `port` {Number} - Optional. |
There was a problem hiding this comment.
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
"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
@sam-github ping - this should be good to merge, no? |
Landed in 89e40c1, thanks. |
`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>
`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>
`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>
`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>
`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>
`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>
port
was listed as required, but as described in the following paragraphs, it's actually not.Checklist
Affected core subsystem(s)
doc