Here's a patch to add backlog option to http-open, users may use it
like:

-----------------------cut------------------------
(run-server (lambda (r b) ...) 
            'http
            '(#:port 1234 #:backlog 1024))
-----------------------end------------------------

I don't think it's necessary to add the docs since it's explicit.
It may help for some guys like me. ;-)

Happy hacking!

>From b75008bd60967be9935ef6e7bb146832cf852ab3 Mon Sep 17 00:00:00 2001
From: Nala Ginrut <nalagin...@gmail.com>
Date: Thu, 4 Apr 2013 12:33:09 +0800
Subject: [PATCH] Add backlog option to http-open

* web/server/http.scm: Add #:backlog to http-open, users may specify
                       backlog to the inner http server.
---
 module/web/server/http.scm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/web/server/http.scm b/module/web/server/http.scm
index cda44f4..c814286 100644
--- a/module/web/server/http.scm
+++ b/module/web/server/http.scm
@@ -62,8 +62,9 @@
                               (inet-pton family host)
                               INADDR_LOOPBACK))
                     (port 8080)
+                    (backlog 128)
                     (socket (make-default-socket family addr port)))
-  (listen socket 128)
+  (listen socket backlog)
   (sigaction SIGPIPE SIG_IGN)
   (let ((poll-set (make-empty-poll-set)))
     (poll-set-add! poll-set socket *events*)
-- 
1.7.10.4

Reply via email to