andrewrk / andrewrk/naught

Server listening on existing socket / file descriptor

Abierto
#65 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
794
Forks
68
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I have a server which listens on an existing socket:

```
http.createServer(app).listen({fd: 11});
```

This works fine if e.g. `node server.js` is called directly by the process that sets up that socket.

It also works fine with the cluster module, because although the socket is only available to the master process, all `listen()` invocations of the workers get passed to the master. So I merely have to have the master tell the workers what fd to listen on; I do that by passing them an environment variable when I fork them.

I'm unclear how to use `naught` with this kind of situation, since the socket would only be available to `naught` itself, and would not be available to my script which `naught` would launch.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.