[bknr-cvs] hans changed trunk/thirdparty/hunchentoot/

BKNR Commits bknr at bknr.net
Tue Mar 15 05:44:16 UTC 2011


Revision: 4661
Author: hans
URL: http://bknr.net/trac/changeset/4661

Revised patch by JTK to increase the default listen backlog for
acceptors and make the value settable.

U   trunk/thirdparty/hunchentoot/acceptor.lisp
U   trunk/thirdparty/hunchentoot/doc/index.xml

Modified: trunk/thirdparty/hunchentoot/acceptor.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/acceptor.lisp	2011-03-15 05:36:46 UTC (rev 4660)
+++ trunk/thirdparty/hunchentoot/acceptor.lisp	2011-03-15 05:44:16 UTC (rev 4661)
@@ -114,6 +114,12 @@
                   :accessor acceptor-listen-socket
                   :documentation "The socket listening for incoming
 connections.")
+   #-:lispworks
+   (listen-backlog :initarg :listen-backlog
+		   :reader acceptor-listen-backlog
+		   :documentation "Number of pending connections
+          allowed in the listen socket before the kernel rejects
+          further incoming connections.")
    (acceptor-shutdown-p :initform nil
                         :accessor acceptor-shutdown-p
                         :documentation "A flag that makes the acceptor
@@ -164,6 +170,7 @@
    :name (gensym)
    :request-class 'request
    :reply-class 'reply
+   :listen-backlog 50
    :taskmaster (make-instance (cond (*supports-threads-p* 'one-thread-per-connection-taskmaster)
                                     (t 'single-threaded-taskmaster)))
    :output-chunking-p t
@@ -458,6 +465,7 @@
                                    usocket:*wildcard-host*)
                                (acceptor-port acceptor)
                                :reuseaddress t
+			       :backlog (acceptor-listen-backlog acceptor)
                                :element-type '(unsigned-byte 8)))
   (values))
 

Modified: trunk/thirdparty/hunchentoot/doc/index.xml
===================================================================
--- trunk/thirdparty/hunchentoot/doc/index.xml	2011-03-15 05:36:46 UTC (rev 4660)
+++ trunk/thirdparty/hunchentoot/doc/index.xml	2011-03-15 05:44:16 UTC (rev 4661)
@@ -459,6 +459,19 @@
           </clix:returns>
         </clix:listed-reader>
 
+        <clix:listed-reader generic='true' name='acceptor-ssl-certificate-file'>
+          <clix:lambda-list>listen-backlog
+          </clix:lambda-list>
+          <clix:returns>number-of-pending-connections
+          </clix:returns>
+        </clix:listed-reader>
+
+        <clix:description>
+          Number of pending connections allowed in the listen socket
+          before the kernel rejects further incoming connections.
+          Non-LispWorks only.
+        </clix:description>
+
         <clix:listed-reader generic='true' name='acceptor-write-timeout'>
           <clix:lambda-list>acceptor
           </clix:lambda-list>





More information about the Bknr-cvs mailing list