joyent/node — Issue #2289: Stable interface for binding a socket without listening
Author: tomyan
Created: 2011-12-07 22:53:07+00:00
State: open

I'd like to be able to bind a socket in a process without listening for connections - I will be accepting connections in forked child processes after the socket has been sent to them. This is currently possible with the following api:

var handle = net._createServerHandle('127.0.0.1', 4242, 4);
child.send('x', handle);

I guess that the underscore indicates that this isn't a supported interface. Would it be possible to have a supported way to do this - I'd be happy to send a pull request if this is deemed to be a good thing. It could be as simple as removing the underscore, or could be a `bind` method on the net.Server class.

Thanks

Tom