Revision: 4261 Author: edi URL: http://bknr.net/trac/changeset/4261
More documentation
U trunk/thirdparty/hunchentoot/compat.lisp U trunk/thirdparty/hunchentoot/lispworks.lisp U trunk/thirdparty/hunchentoot/set-timeouts.lisp U trunk/thirdparty/hunchentoot/taskmaster.lisp
Modified: trunk/thirdparty/hunchentoot/compat.lisp =================================================================== --- trunk/thirdparty/hunchentoot/compat.lisp 2009-02-16 21:53:06 UTC (rev 4260) +++ trunk/thirdparty/hunchentoot/compat.lisp 2009-02-16 22:16:31 UTC (rev 4261) @@ -99,10 +99,10 @@ (values (usocket:vector-quad-to-dotted-quad (usocket:get-peer-address socket)) (usocket:get-peer-port socket)))
-(defun make-socket-stream (socket server) - "Returns a stream for the socket SOCKET. The SERVER argument is +(defun make-socket-stream (socket acceptor) + "Returns a stream for the socket SOCKET. The ACCEPTOR argument is ignored." - (declare (ignore server)) + (declare (ignore acceptor)) (usocket:socket-stream socket))
(defun make-lock (name)
Modified: trunk/thirdparty/hunchentoot/lispworks.lisp =================================================================== --- trunk/thirdparty/hunchentoot/lispworks.lisp 2009-02-16 21:53:06 UTC (rev 4260) +++ trunk/thirdparty/hunchentoot/lispworks.lisp 2009-02-16 22:16:31 UTC (rev 4261) @@ -55,14 +55,23 @@
(defvar *cleanup-interval* 100 "Should be NIL or a positive integer. The system calls -*CLEANUP-FUNCTION* whenever *CLEANUP-INTERVAL* new worker threads have -been created unless the value is NIL.") +*CLEANUP-FUNCTION* whenever *CLEANUP-INTERVAL* new worker threads +(counted globally across all acceptors) have been created unless the +value is NIL. The initial value is 100.
+This variable is only available on LispWorks.") + (defvar *cleanup-function* 'cleanup-function - "The function which is called if *CLEANUP-INTERVAL* is not NIL.") + "A designator for a function without arguments which is called on a +regular basis if *CLEANUP-INTERVAL* is not NIL. The initial value is +the name of a function which invokes a garbage collection on 32-bit +versions of LispWorks.
+This variable is only available on LispWorks.") + (defvar *worker-counter* 0 - "Internal counter used to count worker threads.") + "Internal counter used to count worker threads. Needed for +*CLEANUP-FUNCTION*.")
(defun cleanup-function () "The default for *CLEANUP-FUNCTION*. Invokes a GC on 32-bit
Modified: trunk/thirdparty/hunchentoot/set-timeouts.lisp =================================================================== --- trunk/thirdparty/hunchentoot/set-timeouts.lisp 2009-02-16 21:53:06 UTC (rev 4260) +++ trunk/thirdparty/hunchentoot/set-timeouts.lisp 2009-02-16 22:16:31 UTC (rev 4261) @@ -29,21 +29,19 @@
(in-package :hunchentoot)
-;;; system specific implementation of the function that sets up -;;; connection timeouts - (defun set-timeouts (usocket read-timeout write-timeout) "Sets up timeouts on the given USOCKET object. READ-TIMEOUT is the read timeout period, WRITE-TIMEOUT is the write timeout, specified in -seconds. The timeouts can either be implemented using the low-level -socket options SO_RCVTIMEO and SO_SNDTIMEO or some other, -implementation specific mechanism. On platforms that do not support -separate read and write timeouts, both must be equal or an error will -be signaled. READ-TIMEOUT and WRITE-TIMEOUT may be NIL, which means -that the corresponding socket timeout value will not be set." +(fractional) seconds. The timeouts can either be implemented using +the low-level socket options SO_RCVTIMEO and SO_SNDTIMEO or some +other, implementation specific mechanism. On platforms that do not +support separate read and write timeouts, both must be equal or an +error will be signaled. READ-TIMEOUT and WRITE-TIMEOUT may be NIL, +which means that the corresponding socket timeout value will not be +set." (declare (ignorable usocket read-timeout write-timeout)) - #+:sbcl ;; add other Lisps here if necessary + #+(or :sbcl :cmu) (unless (eql read-timeout write-timeout) (parameter-error "Read and write timeouts for socket must be equal.")) #+:clisp
Modified: trunk/thirdparty/hunchentoot/taskmaster.lisp =================================================================== --- trunk/thirdparty/hunchentoot/taskmaster.lisp 2009-02-16 21:53:06 UTC (rev 4260) +++ trunk/thirdparty/hunchentoot/taskmaster.lisp 2009-02-16 22:16:31 UTC (rev 4261) @@ -114,6 +114,8 @@
#-:lispworks (defun client-as-string (socket) + "A helper function which returns the client's address and port as a +string and tries to act robustly in the presence of network problems." (let ((address (usocket:get-peer-address socket)) (port (usocket:get-peer-port socket))) (when (and address port)