node:net

#Import

import net from "nstdlib/net";

Note

Only the API surface is available. connect() works wherever the host backs the socket bridge. native/ does, and listen() is refused by name everywhere. BlockList and SocketAddress are real in every runtime: address parsing and the rule engine are pure arithmetic, so they are implemented rather than stubbed, and diffed against the host builtin.

#Runtime support

Where it runsStatusExport coverageDetails
nstd✅ worksNative tests match Node.js: net.
Browser❔ not tested100% of Node.jsIt imports with the small process shim. 18/18 Node.js exports are available. No module-specific behavior test ran.
Node.js (host)⚠️ some support100% of Node.js18/18 exports.

#Exports (18 of 18)

Each cell shows what happens when code reads an export:

  • ✅ Available through every import style. A named error also counts.
  • ⚠️ Available through only some import styles.
  • ❔ The export exists but has no value.
  • ❌ The export does not exist.
  • – This environment was not measured.
ExportNode.jsnstdlibbrowser
BlockList
BoundSocket
Server
Socket
SocketAddress
Stream
_createServerHandle
_normalizeArgs
connect
createConnection
createServer
getDefaultAutoSelectFamily
getDefaultAutoSelectFamilyAttemptTimeout
isIP
isIPv4
isIPv6
setDefaultAutoSelectFamily
setDefaultAutoSelectFamilyAttemptTimeout