Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

listenFD #3388

Closed
isaacs opened this issue Jun 7, 2012 · 4 comments
Closed

listenFD #3388

isaacs opened this issue Jun 7, 2012 · 4 comments
Labels
Milestone

Comments

@isaacs
Copy link

isaacs commented Jun 7, 2012

Re-implement listenFD in master.

Ok for windows to raise ENOTSUP if it's too hard to implement, but it must be a clean failure.

@piscisaureus
Copy link

suggestion

  • new net.Server({fd: 3}).listen()
    the argument to listen() would be optional if the socket is already bound. And if it is unbound, then this API is kinda pointless.
  • Check if new net.Socket({fd: 3}) works, and if it doesn't, fix it.

@isaacs
Copy link
Author

isaacs commented Jun 7, 2012

What about new net.Server().listen({fd:3})?

@indutny
Copy link
Member

indutny commented Jun 7, 2012

I like .listen({fd:3}).

@piscisaureus
Copy link

Augment Server.prototype._listen2 (https://github.com/joyent/node/blob/b9e40fbaacc60de562481b764b0e78bf021f7cfa/lib/net.js#L858-897):

  1. add an fd argument
  2. if fd is present, call uv_guess_handle(fd), depending on the result create a PipeWrap or TcpWrap. Similar to: https://github.com/joyent/node/blob/b9e40fbaacc60de562481b764b0e78bf021f7cfa/src/node.js#L284-319

Then change listen and Server.prototype.listen to correctly handle {fd: x}.

@isaacs isaacs closed this as completed in e733dc3 Jun 13, 2012
isaacs added a commit to isaacs/node-v0.x-archive that referenced this issue Jun 15, 2012
* V8: Upgrade to v3.11.10

* npm: Upgrade to 1.1.26

* doc: Improve cross-linking in API docs markdown (Ben Kelly)

* Fix nodejs#3425: removeAllListeners should delete array (Reid Burke)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* Add Buffer.concat method (isaacs)

* windows: make symlinks tolerant to forward slashes (Bert Belder)

* build: Add node.d and node.1 to installer (isaacs)

* cluster: rename worker.unqiueID to worker.id (Andreas Madsen)

* Windows: Enable ETW events on Windows for existing DTrace probes. (Igor Zinkovsky)

* test: bundle node-weak in test/gc so that it doesn't need to be downloaded (Nathan Rajlich)

* Make many tests pass on Windows (Bert Belder)

* Fix nodejs#3388 Support listening on file descriptors (isaacs)

* Fix nodejs#3407 Add os.tmpDir() (isaacs)

* Unbreak the snapshotted build on Windows (Bert Belder)

* Clean up child_process.kill throws (Bert Belder)

* crypto: make cipher/decipher accept buffer args (Ben Noordhuis)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants