Decrease default TCP backlog to 128

...after seeing http://lionet.livejournal.com/42016.html
This commit is contained in:
Ryan Dahl 2009-09-23 17:54:38 +02:00
parent 2d256f34c5
commit 55a2e8271e
4 changed files with 8 additions and 8 deletions

View File

@ -1528,7 +1528,7 @@ Creates a new TCP server.
the <tt>"connection"</tt> event.</p></div>
</dd>
<dt class="hdlist1">
<tt>server.listen(port, host=null, backlog=1024)</tt>
<tt>server.listen(port, host=null, backlog=128)</tt>
</dt>
<dd>
<p>
@ -1536,7 +1536,7 @@ Tells the server to listen for TCP connections to <tt>port</tt> and <tt>host</tt
</p>
<div class="paragraph"><p><tt>host</tt> is optional. If <tt>host</tt> is not specified the server will accept client
connections on any network address.</p></div>
<div class="paragraph"><p>The third argument, <tt>backlog</tt>, is also optional and defaults to 1024. The
<div class="paragraph"><p>The third argument, <tt>backlog</tt>, is also optional and defaults to 128. The
<tt>backlog</tt> argument defines the maximum length to which the queue of pending
connections for the server may grow.</p></div>
<div class="paragraph"><p>This function is synchronous.</p></div>
@ -1944,7 +1944,7 @@ init (Handle&lt;Object&gt; target)
<div id="footer">
<div id="footer-text">
Version 0.1.11<br />
Last updated 2009-09-23 16:59:33 CEST
Last updated 2009-09-23 17:54:21 CEST
</div>
</div>
</body>

View File

@ -985,13 +985,13 @@ The +connection_listener+ argument is automatically set as a listener for
the +"connection"+ event.
+server.listen(port, host=null, backlog=1024)+ ::
+server.listen(port, host=null, backlog=128)+ ::
Tells the server to listen for TCP connections to +port+ and +host+.
+
+host+ is optional. If +host+ is not specified the server will accept client
connections on any network address.
+
The third argument, +backlog+, is also optional and defaults to 1024. The
The third argument, +backlog+, is also optional and defaults to 128. The
+backlog+ argument defines the maximum length to which the queue of pending
connections for the server may grow.
+

View File

@ -1443,7 +1443,7 @@ argument is automatically set as a listener for the
event\.
.RE
.PP
server\.listen(port, host=null, backlog=1024)
server\.listen(port, host=null, backlog=128)
.RS 4
Tells the server to listen for TCP connections to
port
@ -1456,7 +1456,7 @@ host
is not specified the server will accept client connections on any network address\.
.sp
The third argument,
backlog, is also optional and defaults to 1024\. The
backlog, is also optional and defaults to 128\. The
backlog
argument defines the maximum length to which the queue of pending connections for the server may grow\.
.sp

View File

@ -521,7 +521,7 @@ Handle<Value> Server::Listen(const Arguments& args) {
#endif
char host[DNS_MAXNAME+1] = "\0";
int backlog = 1024;
int backlog = 128;
if (args.Length() == 2) {
if (args[1]->IsInt32()) {