net: add pauseOnConnect option to createServer()
authorcjihrig <cjihrig@gmail.com>
Sat, 18 Oct 2014 01:45:40 +0000 (21:45 -0400)
committerTrevor Norris <trev.norris@gmail.com>
Mon, 27 Oct 2014 21:11:20 +0000 (14:11 -0700)
commitc2b4f4809b8c30537b08f2dc76f798ea7a225907
treeaeef1de8c160ee20cc245ad14a52194342264a7d
parent15aa47e2618a565aba0c1ca29ef63f269f26dc74
net: add pauseOnConnect option to createServer()

Currently when a server receives a new connection the underlying socket
handle begins reading data immediately. This causes problems when
sockets are passed between processes, as data can be read by the first
process and thus never read by the second process.

This commit allows sockets that are constructed with a handle to be
paused initially.

PR-URL: https://github.com/joyent/node/pull/8576
Fixes: https://github.com/joyent/node/issues/7905
Fixes: https://github.com/joyent/node/issues/7784
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
doc/api/net.markdown
lib/net.js
test/simple/test-net-server-pause-on-connect.js [new file with mode: 0644]