joyent/node — pull request #5013 by bnoordhuis (2013-03-14 14:40:07+00:00)
Title: net: improve arbitrary tcp socket support

From the commit log:

Consider this example:

// fd 3 is a bound tcp socket
var s = net.createServer(cb);
s.listen({ fd: 3 });
console.log(s.address()); // prints null

This commit makes net.Server#address() print the actual address.

Ditto for non-listen sockets; properties like net.Socket#localAddress
and net.Socket#remoteAddress now return the correct value.

Fixes #5009.