doc: Update rinfo object definition for UDP message event#10050
doc: Update rinfo object definition for UDP message event#10050mcrummey wants to merge 1 commit into
Conversation
|
/cc @nodejs/documentation |
There was a problem hiding this comment.
"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?
There was a problem hiding this comment.
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.
|
Ping @mcrummey: Any chance you can update this in accordance with the comments from @sam-github? |
e3c4d01 to
a46c873
Compare
|
Updated the PR to include @sam-github comments. Thanks for your patience and please let me know there are any other issues. |
|
@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? |
There was a problem hiding this comment.
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
|
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? |
I guess I wouldn't object, but I also feel like sample code is inherently valuable. |
|
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). |
a46c873 to
c757255
Compare
Detailing fields of object
|
Added IPv4|IPv6 and removed example. |
Provide details for fields of rinfo object of UDP message event. PR-URL: nodejs#10050 Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
doc
Description of change
Detailing fields of object