Skip to content

doc: Update rinfo object definition for UDP message event#10050

Closed
mcrummey wants to merge 1 commit into
nodejs:masterfrom
mcrummey:document-rinfo-object
Closed

doc: Update rinfo object definition for UDP message event#10050
mcrummey wants to merge 1 commit into
nodejs:masterfrom
mcrummey:document-rinfo-object

Conversation

@mcrummey
Copy link
Copy Markdown

@mcrummey mcrummey commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

Detailing fields of object

@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. labels Dec 1, 2016
@imyller imyller added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 1, 2016
@Trott
Copy link
Copy Markdown
Member

Trott commented Dec 5, 2016

/cc @nodejs/documentation

Comment thread doc/api/dgram.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"The address's protocol family", perhaps? The address family is same for sender and receiver, ipv4 or ipv6, but this text makes it sound like its sender specific. Also, what is the value? Is it a string 'ipv4'/6? Something else?

Comment thread doc/api/dgram.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would be nice to show some example output in a comment afterwards, to justify the existence of the example. As-is, I think this so-called "example" offers exactly zero additional benefit over the docs, and would be better deleted. People already know how to write functions in js, and attach event listeners, which is all this shows.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added example output.

@Trott
Copy link
Copy Markdown
Member

Trott commented Dec 22, 2016

Ping @mcrummey: Any chance you can update this in accordance with the comments from @sam-github?

@mcrummey
Copy link
Copy Markdown
Author

Updated the PR to include @sam-github comments. Thanks for your patience and please let me know there are any other issues.

@Trott
Copy link
Copy Markdown
Member

Trott commented Dec 24, 2016

@sam-github @nodejs/documentation Is this an OK way to show the output of the sample code? If so, anyone want to approve this change? If not, anyone want to suggest a better way to do it to @mcrummey?

Comment thread doc/api/dgram.md Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should say what the address family string can be, 'IPv4' or 'IPv6', I think? Its not easy to guess. The example below shows the IPv4 output, but in some places in the API various protocol type identifiers are not handled uniformly

@sam-github
Copy link
Copy Markdown
Contributor

Looks like the standard way in our docs to show example code output.

I still feel the example offers no value. The only thing it shows that the docs don't is what the address family string can be for IPv4, and for that purpose, it is incomplete, because what about IPv6?

Does anybody object to deleting the example?

@Trott
Copy link
Copy Markdown
Member

Trott commented Dec 24, 2016

Does anybody object to deleting the example?

I guess I wouldn't object, but I also feel like sample code is inherently valuable.

@sam-github
Copy link
Copy Markdown
Contributor

Even a one line example that shows a console.log of an object? What is the value?

@Trott
Copy link
Copy Markdown
Member

Trott commented Dec 24, 2016

Even a one line example that shows a console.log of an object? What is the value?

Since you seem to feel it should be removed, and I could go either way on it, let's remove it (unless someone else has a different opinion).

@mcrummey mcrummey force-pushed the document-rinfo-object branch from a46c873 to c757255 Compare December 24, 2016 19:56
@mcrummey
Copy link
Copy Markdown
Author

Added IPv4|IPv6 and removed example.

Trott pushed a commit to Trott/io.js that referenced this pull request Dec 28, 2016
Provide details for fields of rinfo object of UDP message event.

PR-URL: nodejs#10050
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Copy link
Copy Markdown
Member

Trott commented Dec 28, 2016

Landed in 109bfd2.
Thanks for the contribution @mcrummey! 🎉