On Fri, 2013-04-05 at 08:22 +0800, Daniel Hartwig wrote: > On 4 April 2013 12:39, Nala Ginrut <nalagin...@gmail.com> wrote: > > I don't think it's necessary to add the docs since it's explicit. > > It may help for some guys like me. ;-) > > Every part of the API must be documented. How else do guys like you > know this is there? >
Resend patch, added the example for #:backlog. Since there's no docs for all run-server open-params, but examples. So I just added the example. I think it's enough to explain the usage. Please ping me if it's necessary to add more docs for open-params in detail. But it's another brand new patch I think. Thanks!
>From a5cae0d525bbbdcc65f65edb22908a8034e6fb8e 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. * doc/ref/web.texi: Add example for #:backlog. --- doc/ref/web.texi | 2 ++ module/web/server/http.scm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/ref/web.texi b/doc/ref/web.texi index 0d41f9f..288699e 100644 --- a/doc/ref/web.texi +++ b/doc/ref/web.texi @@ -1667,6 +1667,8 @@ implementation's open function. (run-server handler 'http '(#:family AF_INET6 #:port 8081)) ;; Custom socket (run-server handler 'http `(#:socket ,(sudo-make-me-a-socket))) +;; Custom backlog (the default backlog is 128) +(run-server handler 'http `(#:backlog 1000)) @end example @end deffn 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