Backport: doc: make socket IPC examples more robust
Backport of #13196
This commit aims to improve the documentation examples that send sockets over IPC channels. Specifically, pauseOnConnect is added to a server that inspects the socket before sending and a 'message' handler adds a check that the socket still exists.
PR-URL: https://github.com/nodejs/node/pull/13196 Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com Reviewed-By: Refael Ackermann refack@gmail.com
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