Uh oh!
There was an error while loading. Please reload this page.
doc: mention errors thrown by methods called on an unbound dgram.Socket - #33983
doc: mention errors thrown by methods called on an unbound dgram.Socket#33983mkrawczuk wants to merge 3 commits into
Conversation
addaleax
left a comment
There was a problem hiding this comment.
I agree, the error system is very inconsistent here, unfortunately … 😕 Thanks for the PR!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Trott
commented
Jun 20, 2020
The text is fine as is, but if you want to fine-tune it even more, here's one more optional suggestion: Instead of |
mkrawczuk
commented
Jun 21, 2020
Yeah, let's not be satisfied with 99% correct if we can be 100% correct with almost no effort. |
Uh oh!
There was an error while loading. Please reload this page.
PR-URL: #33983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Trott
commented
Jun 24, 2020
Landed in 91d9cdf |
PR-URL: #33983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33983 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
While working on this I have discovered an inconsistency: given
dgram.Socketinstance is undbound, callingaddress()on it results in a system errorEBADFbeing thrown, while callingremoteAddress()results inERR_SOCKET_DGRAM_NOT_CONNECTED.Also, calling
send()on an unbound socket throwsERR_SOCKET_BAD_PORTwhich might also be found misguiding.These I believe are easy fixes. Once the documentation resembles the current state of things I can open another PR introducing a fix to it.
Also mentioned a side effect caused by
socket.addMembership()andsocket.addSourceSpecificMembership(). Not sure if it is desired.