[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Sun Nov 27 21:47:15 UTC 2011


Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv21065

Modified Files:
	ChangeLog swank-abcl.lisp swank-allegro.lisp 
	swank-backend.lisp swank-ccl.lisp swank-clisp.lisp 
	swank-cmucl.lisp swank-corman.lisp swank-ecl.lisp 
	swank-lispworks.lisp swank-sbcl.lisp swank-scl.lisp swank.lisp 
Log Message:
* swank.lisp (create-server): Add a :backlog argument.
(setup-server): Pass it along.

* swank-backend.lisp (create-socket): Backlog argument.
* swank-abcl.lisp: Implement it.
* swank-allegro.lisp:
* swank-ccl.lisp:
* swank-clisp.lisp:
* swank-cmucl.lisp:
* swank-corman.lisp:
* swank-ecl.lisp:
* swank-lispworks.lisp:
* swank-sbcl.lisp:
* swank-scl.lisp:

--- /project/slime/cvsroot/slime/ChangeLog	2011/11/27 19:24:53	1.2249
+++ /project/slime/cvsroot/slime/ChangeLog	2011/11/27 21:47:14	1.2250
@@ -1,5 +1,22 @@
 2011-11-27  Helmut Eller  <heller at common-lisp.net>
 
+	* swank.lisp (create-server): Add a :backlog argument.
+	(setup-server): Pass it along.
+
+	* swank-backend.lisp (create-socket): Backlog argument.
+	* swank-abcl.lisp: Implement it.
+	* swank-allegro.lisp:
+	* swank-ccl.lisp:
+	* swank-clisp.lisp:
+	* swank-cmucl.lisp:
+	* swank-corman.lisp:
+	* swank-ecl.lisp:
+	* swank-lispworks.lisp:
+	* swank-sbcl.lisp:
+	* swank-scl.lisp:
+
+2011-11-27  Helmut Eller  <heller at common-lisp.net>
+
 	* swank-cmucl.lisp (make-socket-io-stream): Create character
 	stream if external-format is non-nil.
 
--- /project/slime/cvsroot/slime/swank-abcl.lisp	2011/11/06 17:05:41	1.89
+++ /project/slime/cvsroot/slime/swank-abcl.lisp	2011/11/27 21:47:15	1.90
@@ -131,7 +131,7 @@
 (defimplementation preferred-communication-style ()
   :spawn)
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (ext:make-server-socket port))
 
 (defimplementation local-port (socket)
--- /project/slime/cvsroot/slime/swank-allegro.lisp	2011/11/06 17:06:20	1.147
+++ /project/slime/cvsroot/slime/swank-allegro.lisp	2011/11/27 21:47:15	1.148
@@ -43,9 +43,10 @@
 (defimplementation preferred-communication-style ()
   :spawn)
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (socket:make-socket :connect :passive :local-port port 
-                      :local-host host :reuse-address t))
+                      :local-host host :reuse-address t
+                      :backlog (or backlog 5)))
 
 (defimplementation local-port (socket)
   (socket:local-port socket))
--- /project/slime/cvsroot/slime/swank-backend.lisp	2011/11/21 16:34:12	1.212
+++ /project/slime/cvsroot/slime/swank-backend.lisp	2011/11/27 21:47:15	1.213
@@ -433,8 +433,9 @@
 
 ;;;; TCP server
 
-(definterface create-socket (host port)
-  "Create a listening TCP socket on interface HOST and port PORT .")
+(definterface create-socket (host port &key backlog)
+  "Create a listening TCP socket on interface HOST and port PORT.
+BACKLOG queue length for incoming connections.")
 
 (definterface local-port (socket)
   "Return the local port number of SOCKET.")
--- /project/slime/cvsroot/slime/swank-ccl.lisp	2011/11/06 17:04:32	1.23
+++ /project/slime/cvsroot/slime/swank-ccl.lisp	2011/11/27 21:47:15	1.24
@@ -95,9 +95,10 @@
 (defimplementation preferred-communication-style ()
   :spawn)
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (ccl:make-socket :connect :passive :local-port port 
-                   :local-host host :reuse-address t))
+                   :local-host host :reuse-address t
+                   :backlog (or backlog 5)))
 
 (defimplementation local-port (socket)
   (ccl:local-port socket))
--- /project/slime/cvsroot/slime/swank-clisp.lisp	2011/11/06 17:05:41	1.97
+++ /project/slime/cvsroot/slime/swank-clisp.lisp	2011/11/27 21:47:15	1.98
@@ -151,9 +151,8 @@
 
 ;;;; TCP Server
 
-(defimplementation create-socket (host port)
-  (declare (ignore host))
-  (socket:socket-server port))
+(defimplementation create-socket (host port &key backlog)
+  (socket:socket-server port :interface host :backlog (or backlog 5)))
 
 (defimplementation local-port (socket)
   (socket:socket-server-port socket))
--- /project/slime/cvsroot/slime/swank-cmucl.lisp	2011/11/27 19:24:53	1.238
+++ /project/slime/cvsroot/slime/swank-cmucl.lisp	2011/11/27 21:47:15	1.239
@@ -92,16 +92,17 @@
   :sigio)
 
 #-(or darwin mips)
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (let* ((addr (resolve-hostname host))
          (addr (if (not (find-symbol "SOCKET-ERROR" :ext))
                    (ext:htonl addr)
                    addr)))
-    (ext:create-inet-listener port :stream :reuse-address t :host addr)))
+    (ext:create-inet-listener port :stream :reuse-address t :host addr
+                              :backlog (or backlog 5))))
 
 ;; There seems to be a bug in create-inet-listener on Mac/OSX and Irix.
 #+(or darwin mips)
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (declare (ignore host))
   (ext:create-inet-listener port :stream :reuse-address t))
 
--- /project/slime/cvsroot/slime/swank-corman.lisp	2010/03/02 12:38:07	1.25
+++ /project/slime/cvsroot/slime/swank-corman.lisp	2011/11/27 21:47:15	1.26
@@ -224,7 +224,7 @@
 
 ;;; Socket communication
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (sockets:start-sockets)
   (sockets:make-server-socket :host host :port port))
 
--- /project/slime/cvsroot/slime/swank-ecl.lisp	2011/11/06 18:34:51	1.70
+++ /project/slime/cvsroot/slime/swank-ecl.lisp	2011/11/27 21:47:15	1.71
@@ -62,13 +62,13 @@
   (car (sb-bsd-sockets:host-ent-addresses
         (sb-bsd-sockets:get-host-by-name name))))
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (let ((socket (make-instance 'sb-bsd-sockets:inet-socket
 			       :type :stream
 			       :protocol :tcp)))
     (setf (sb-bsd-sockets:sockopt-reuse-address socket) t)
     (sb-bsd-sockets:socket-bind socket (resolve-hostname host) port)
-    (sb-bsd-sockets:socket-listen socket 5)
+    (sb-bsd-sockets:socket-listen socket (or backlog 5))
     socket))
 
 (defimplementation local-port (socket)
--- /project/slime/cvsroot/slime/swank-lispworks.lisp	2011/11/06 17:06:30	1.145
+++ /project/slime/cvsroot/slime/swank-lispworks.lisp	2011/11/27 21:47:15	1.146
@@ -80,10 +80,11 @@
     (fixnum socket)
     (comm:socket-stream (comm:socket-stream-socket socket))))
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (multiple-value-bind (socket where errno)
       #-(or lispworks4.1 (and macosx lispworks4.3))
-      (comm::create-tcp-socket-for-service port :address host)
+      (comm::create-tcp-socket-for-service port :address host
+                                           :backlog (or backlog 5))
       #+(or lispworks4.1 (and macosx lispworks4.3))
       (comm::create-tcp-socket-for-service port)
     (cond (socket socket)
--- /project/slime/cvsroot/slime/swank-sbcl.lisp	2011/11/19 16:35:58	1.293
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp	2011/11/27 21:47:15	1.294
@@ -83,13 +83,13 @@
   (car (sb-bsd-sockets:host-ent-addresses
         (sb-bsd-sockets:get-host-by-name name))))
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (let ((socket (make-instance 'sb-bsd-sockets:inet-socket
 			       :type :stream
 			       :protocol :tcp)))
     (setf (sb-bsd-sockets:sockopt-reuse-address socket) t)
     (sb-bsd-sockets:socket-bind socket (resolve-hostname host) port)
-    (sb-bsd-sockets:socket-listen socket 5)
+    (sb-bsd-sockets:socket-listen socket (or backlog 5))
     socket))
 
 (defimplementation local-port (socket)
--- /project/slime/cvsroot/slime/swank-scl.lisp	2011/11/06 17:05:41	1.38
+++ /project/slime/cvsroot/slime/swank-scl.lisp	2011/11/27 21:47:15	1.39
@@ -26,9 +26,10 @@
 (defimplementation preferred-communication-style ()
   :spawn)
 
-(defimplementation create-socket (host port)
+(defimplementation create-socket (host port &key backlog)
   (let ((addr (resolve-hostname host)))
-    (ext:create-inet-listener port :stream :host addr :reuse-address t)))
+    (ext:create-inet-listener port :stream :host addr :reuse-address t
+                              :backlog (or backend 5))))
 
 (defimplementation local-port (socket)
   (nth-value 1 (ext::get-socket-host-and-port (socket-fd socket))))
--- /project/slime/cvsroot/slime/swank.lisp	2011/11/27 19:24:33	1.763
+++ /project/slime/cvsroot/slime/swank.lisp	2011/11/27 21:47:15	1.764
@@ -733,16 +733,17 @@
 This is the entry point for Emacs."
   (setup-server 0
                 (lambda (port) (announce-server-port port-file port))
-                style dont-close))
+                style dont-close nil))
 
 (defun create-server (&key (port default-server-port)
                         (style *communication-style*)
-                        (dont-close *dont-close*))
+                        (dont-close *dont-close*)
+                        backlog)
   "Start a SWANK server on PORT running in STYLE.
 If DONT-CLOSE is true then the listen socket will accept multiple
 connections, otherwise it will be closed after the first."
   (setup-server port #'simple-announce-function
-                style dont-close))
+                style dont-close backlog))
 
 (defun find-external-format-or-lose (coding-system)
   (or (find-external-format coding-system)
@@ -750,10 +751,10 @@
 
 (defparameter *loopback-interface* "127.0.0.1")
 
-(defun setup-server (port announce-fn style dont-close)
+(defun setup-server (port announce-fn style dont-close backlog)
   (declare (type function announce-fn))
   (init-log-output)
-  (let* ((socket (create-socket *loopback-interface* port))
+  (let* ((socket (create-socket *loopback-interface* port :backlog backlog))
          (local-port (local-port socket)))
     (funcall announce-fn local-port)
     (flet ((serve ()





More information about the slime-cvs mailing list