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 runs | Status | Export coverage | Details |
|---|---|---|---|
| nstd | ✅ works | – | Native tests match Node.js: net. |
| Browser | ❔ not tested | 100% of Node.js | It imports with the small process shim. 18/18 Node.js exports are available. No module-specific behavior test ran. |
| Node.js (host) | ⚠️ some support | 100% of Node.js | 18/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.
| Export | Node.js | nstdlib | browser |
|---|---|---|---|
BlockList | ✅ | ✅ | ✅ |
BoundSocket | ✅ | ✅ | ✅ |
Server | ✅ | ✅ | ✅ |
Socket | ✅ | ✅ | ✅ |
SocketAddress | ✅ | ✅ | ✅ |
Stream | ✅ | ✅ | ✅ |
_createServerHandle | ✅ | ✅ | ✅ |
_normalizeArgs | ✅ | ✅ | ✅ |
connect | ✅ | ✅ | ✅ |
createConnection | ✅ | ✅ | ✅ |
createServer | ✅ | ✅ | ✅ |
getDefaultAutoSelectFamily | ✅ | ✅ | ✅ |
getDefaultAutoSelectFamilyAttemptTimeout | ✅ | ✅ | ✅ |
isIP | ✅ | ✅ | ✅ |
isIPv4 | ✅ | ✅ | ✅ |
isIPv6 | ✅ | ✅ | ✅ |
setDefaultAutoSelectFamily | ✅ | ✅ | ✅ |
setDefaultAutoSelectFamilyAttemptTimeout | ✅ | ✅ | ✅ |