This commit reverts the following commits (in reverse chronological order):
74d076c errnoException must be done immediately
ddb02b9 net: support Server.listen(Pipe)
085a098 cluster: do not use internal server API
d138875 net: lazy listen on handler
Commit d138875 introduced a backwards incompatible change that broke the
simple/test-net-socket-timeout and simple/test-net-lazy-listen tests - it
defers listening on the target port until the `net.Server` instance has at
least one 'connection' event listener.
The other patches had to be reverted in order to revert d138875.
Fixes#3832.
This implements server.listen({ fd: <filedescriptor> }). The fd should
refer to an underlying resource that is already bound and listening, and
causes the new server to also accept connections on it.
Not supported on Windows. Raises ENOTSUP.
child_process.fork() support sending native hander object, this patch add support for sending
net.Server and net.Socket object by converting the object to a native handle object and back
to a useful object again.
Note when sending a Socket there was emitted by a net Server object, the server.connections
property becomes null, because it is no longer possible to known when it is destroyed.
Mostly quite minor edits. Those possibly of more interest are:
emitter.setMaxListeners(n)
That the limit is per event name for an emitter.
fs.readlink()
Not a path, but rather the symbolic link's string value, which
would be at best a partial path, certainly not a 'resolvedPath'
global.__filename
This may be "well-known" but this is a full path to the module
that referencing code is running in. It is not the main program's
path, unless you are in the main program. Each module knows only
its own path.
server.listen(port,...)
I actually needed this functionality... "gimme just _any_ next port"
stream.end()
stream.destroy()
Yeah, everybody knows what happens to the queued data, but let's
make it *really* explicit for the first readers.
net.createConnection() is wrapper for net.Socket.connect(),
but There is mismatch between them.
net.createConnection(port, [host])
net.Socket.connect(port, [host], [callback])
Fixes#1208.