From a55a9ff3c2e913f20230535fde1fcb703e25c996 Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Fri, 20 May 2011 14:38:49 -0700 Subject: [PATCH] Additional docs for net.listenFD() Fixes #1080. --- doc/api/net.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 16baacb3de..8c6667a743 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -104,12 +104,13 @@ when the server has been bound. Start a server listening for connections on the given file descriptor. This file descriptor must have already had the `bind(2)` and `listen(2)` system -calls invoked on it. +calls invoked on it. Additionally, it must be set non-blocking; try +`fcntl(fd, F_SETFL, O_NONBLOCK)`. #### server.pause(msecs) -Stop accepting connections for the given number of milliseconds (default is -one second). This could be useful for throttling new connections against +Stop accepting connections for the given number of milliseconds (default is +one second). This could be useful for throttling new connections against DoS attacks or other oversubscription. #### server.close()