Skip to content

doc: mention errors thrown by methods called on an unbound dgram.Socket

While working on this I have discovered an inconsistency: given dgram.Socket instance is undbound, calling address() on it results in a system error EBADF being thrown, while calling remoteAddress() results in ERR_SOCKET_DGRAM_NOT_CONNECTED.

Also, calling send() on an unbound socket throws ERR_SOCKET_BAD_PORT which 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() and socket.addSourceSpecificMembership(). Not sure if it is desired.

Merge request reports

Loading