[x] stream: _writeAfterEnd
Allow stream implementors to override write after end errors, similar to how it's done for net.Socket. Removed net.Socket special case with generic solution.
Pulled out from https://github.com/nodejs/node/pull/29179 per request.
Refs: https://github.com/nodejs/node/issues/29068
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines