Thank you so much!  Your solution works, and now I can use  nodejs and 
 xinetd !!!

Artem

On Wednesday, September 11, 2013 at 9:19:05 PM UTC+5, tedx wrote:
>
> On a much older version of node I'd come up with a solution but that no 
> longer works. For those who don't know xinetd listens for incoming 
> requests over a network and launches the appropriate service 
> <http://en.wikipedia.org/wiki/Network_service> for that request. The 
> service communicates with its client by reading from stdin and writing to 
> stdout. I tried:
>
> // Configure our HTTP server to respond with Hello World to all requests.
> var server = http.createServer(function (request, response) {
>   response.writeHead(200, {"Content-Type": "text/plain"});
>   response.end("Hello World\n");
> });
> // Listen on stdin
> server.listen({fd: 0});
>
> but this fails because the connection has already been established by 
> xinetd. Is there a way to set the server connection to stdin and cause the 
> callback to be executed without listening?
>
> Ted
> <http://en.wikipedia.org/wiki/Xinetd#cite_note-2>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/9335c4bd-109f-4e44-811f-f40a37b825ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to