unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Add backlog option to http-open
@ 2013-04-04  4:39 Nala Ginrut
  2013-04-05  0:22 ` Daniel Hartwig
  2013-04-05  0:29 ` Daniel Hartwig
  0 siblings, 2 replies; 6+ messages in thread
From: Nala Ginrut @ 2013-04-04  4:39 UTC (permalink / raw)
  To: guile-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

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!


[-- Attachment #2: 0001-Add-backlog-option-to-http-open.patch --]
[-- Type: text/x-patch, Size: 1026 bytes --]

From b75008bd60967be9935ef6e7bb146832cf852ab3 Mon Sep 17 00:00:00 2001
From: Nala Ginrut <nalaginrut@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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-07  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04  4:39 [PATCH] Add backlog option to http-open Nala Ginrut
2013-04-05  0:22 ` Daniel Hartwig
2013-04-06  4:14   ` Nala Ginrut
2013-04-07  6:56     ` Daniel Hartwig
2013-04-05  0:29 ` Daniel Hartwig
2013-04-05  1:29   ` Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).