Encapsulate stream requests more: - `WriteWrap` and `ShutdownWrap` classes are now tailored to the streams on which they are used. In particular, for most streams these are now plain `AsyncWrap`s and do not carry the overhead of unused libuv request data. - Provide generic `Write()` and `Shutdown()` methods that wrap around the actual implementations, and make *usage* of streams easier, rather than implementing; for example, wrap objects don’t need to be provided by callers anymore. - Use `EmitAfterWrite()` and `EmitAfterShutdown()` handlers to call the corresponding JS handlers, rather than always trying to call them. This makes usage of streams by other C++ code easier and leaner. Also fix up some tests that were previously not actually testing asynchronicity when the comments indicated that they would. PR-URL: https://github.com/nodejs/node/pull/18676 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> |
||
|---|---|---|
| .. | ||
| cluster | ||
| crypto | ||
| http2 | ||
| loader | ||
| process | ||
| streams | ||
| test | ||
| util | ||
| vm | ||
| async_hooks.js | ||
| bootstrap_node.js | ||
| buffer.js | ||
| child_process.js | ||
| constants.js | ||
| encoding.js | ||
| errors.js | ||
| freelist.js | ||
| fs.js | ||
| http.js | ||
| inspector_async_hook.js | ||
| linkedlist.js | ||
| module.js | ||
| net.js | ||
| os.js | ||
| process.js | ||
| querystring.js | ||
| readline.js | ||
| readme.md | ||
| repl.js | ||
| safe_globals.js | ||
| socket_list.js | ||
| tls.js | ||
| trace_events_async_hooks.js | ||
| url.js | ||
| util.js | ||
| v8_prof_polyfill.js | ||
| v8_prof_processor.js | ||
| wrap_js_stream.js | ||
Internal Modules
The modules in lib/internal are intended for internal use in Node.js core
only, and are not accessible with require() from user modules. These are
subject to change at any time. Reliance on these modules outside of core
is not supported in any way.