Skip to content

Commit

Permalink
doc: buffers are not sent over IPC with a socket
Browse files Browse the repository at this point in the history
If a socket is sent to a child, any data that is buffered in the socket
will not be sent to the child. The child will only receive data from the
socket that is sent after the child has the socket.

PR-URL: #6951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Tim Kuijsten authored and Myles Borins committed Jul 14, 2016
1 parent 5c1d8e1 commit 1e86d16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@ Applications should avoid using such messages or listening for
The optional `sendHandle` argument that may be passed to `child.send()` is for
passing a TCP server or socket object to the child process. The child will
receive the object as the second argument passed to the callback function
registered on the `process.on('message')` event.
registered on the `process.on('message')` event. Any data that is received and
buffered in the socket will not be sent to the child.

The optional `callback` is a function that is invoked after the message is
sent but before the child may have received it. The function is called with a
Expand Down

0 comments on commit 1e86d16

Please sign in to comment.