node:dgram

#Import

import dgram from "nstdlib/node/dgram";

Note

The API is available, but not everything works. bind(), send() and the message path work wherever the host backs the socket bridge. native/ does, and multicast with them. internalBinding('udp_wrap') is this tree's own UDP over node_binding_tcp_wrap_dispatch, the same seam net uses, so a runtime with no host behind it refuses by name at new UDP().

#Support

node:dgram. nstd: works; Node test suite 96.2% passing. Browser: not tested; export coverage 100%; Node test suite 84.6% passing.

  • nstd: Gives the same output as Node.js in side-by-side tests: dgram.
  • Browser: Loads with a minimal process object. 2 of Node's 2 exports are available. No behavior check covers it yet.

#Exports (2)

Every name Node.js exports from this module, and what you get when you read it, as a named import or as a property of the default import:

  • ✅ A value, both ways. An export that throws an error naming the missing feature also counts.
  • ⚠️ A value one way, undefined the other.
  • ❔ undefined both ways.
  • ❌ Not exported at all.
  • – Not measured.
ExportNode.jsBrowser
Socket✅✅
createSocket✅✅

#Diagnostics

nstdlib running inside Node.js. This isn't an environment it's meant for, so it isn't shown above, but it tells a library problem from an environment one:

  • coverage: 2/2 of the host's export names answer inside host node. API only. bind(), send() and the message path work wherever the host backs the socket bridge. native/ does, and multicast with them. internalBinding('udp_wrap') is this tree's own UDP over node_binding_tcp_wrap_dispatch, the same seam net uses, so a runtime with no host behind it refuses by name at new UDP().
  • smoke: Imports in a clean child process.
  • node-suite: 63/78 of Node's own eligible tests pass with ./dist inside host node. A failure there and in the page is the library's, one only in the page is the engine's.