From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] Add backlog option to http-open Date: Thu, 04 Apr 2013 12:39:33 +0800 Organization: HFG Message-ID: <1365050373.2755.3.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-Vkpov9KHsfoZsoIJj+PS" X-Trace: ger.gmane.org 1365050389 8587 80.91.229.3 (4 Apr 2013 04:39:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Apr 2013 04:39:49 +0000 (UTC) To: "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Apr 04 06:40:17 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UNbyB-0008PE-0D for guile-devel@m.gmane.org; Thu, 04 Apr 2013 06:40:15 +0200 Original-Received: from localhost ([::1]:47519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNbxm-0007yg-1N for guile-devel@m.gmane.org; Thu, 04 Apr 2013 00:39:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNbxf-0007xi-97 for guile-devel@gnu.org; Thu, 04 Apr 2013 00:39:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNbxa-00058n-JW for guile-devel@gnu.org; Thu, 04 Apr 2013 00:39:43 -0400 Original-Received: from mail-pb0-f51.google.com ([209.85.160.51]:41418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNbxa-00058U-DV for guile-devel@gnu.org; Thu, 04 Apr 2013 00:39:38 -0400 Original-Received: by mail-pb0-f51.google.com with SMTP id rr4so1224022pbb.10 for ; Wed, 03 Apr 2013 21:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:date:organization :content-type:x-mailer:mime-version; bh=afgrQaAdGKVvh/Ykdi1q17wfF4ZSkyebIb2BnJLgFJg=; b=pngjtZtlha47YL62tnfF1SPHaAuzKww24W/EitnTKfIczEn08/Phgx95WhLmmieqzh +hnMdtj9HiSisDfmYFYmfJOidpYVrTvi9AvrCtcz1bO7am9SXt51qzqg2IUCHuGkhRyG qQnTZL8girQXpju1JIDT0RfSgraO81+WVT+paNxJTnRRVA+uCB/lpRmJqyAUuoXiMieJ yWFTyV7gOaZ2ifuqYoGyYS8aVetxuxOvfB9/RCrPCRQfvWg2dbNcqecePMVq9V/xFnlk PaBYcEtWwZm34F07CQvnRIptMiiWeisKeRX4KfOCzN/8kt/2eqi4u8W8ZHcBre5aHppb zaew== X-Received: by 10.68.235.36 with SMTP id uj4mr6655490pbc.54.1365050377289; Wed, 03 Apr 2013 21:39:37 -0700 (PDT) Original-Received: from [192.168.100.102] ([183.13.170.158]) by mx.google.com with ESMTPS id t1sm9728915pab.12.2013.04.03.21.39.35 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 21:39:36 -0700 (PDT) X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.51 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16135 Archived-At: --=-Vkpov9KHsfoZsoIJj+PS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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! --=-Vkpov9KHsfoZsoIJj+PS Content-Disposition: attachment; filename="0001-Add-backlog-option-to-http-open.patch" Content-Type: text/x-patch; name="0001-Add-backlog-option-to-http-open.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit >From b75008bd60967be9935ef6e7bb146832cf852ab3 Mon Sep 17 00:00:00 2001 From: Nala Ginrut 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 --=-Vkpov9KHsfoZsoIJj+PS--