[slime-cvs] CVS update: slime/swank-backend.lisp slime/swank-cmucl.lisp slime/swank-sbcl.lisp slime/swank-allegro.lisp slime/swank-lispworks.lisp slime/swank-openmcl.lisp slime/swank-clisp.lisp

Helmut Eller heller at common-lisp.net
Sun Feb 8 19:19:43 UTC 2004


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

Modified Files:
	swank-backend.lisp swank-cmucl.lisp swank-sbcl.lisp 
	swank-allegro.lisp swank-lispworks.lisp swank-openmcl.lisp 
	swank-clisp.lisp 
Log Message:
(create-socket): Take interface as argument.

Date: Sun Feb  8 14:19:42 2004
Author: heller

Index: slime/swank-backend.lisp
diff -u slime/swank-backend.lisp:1.28 slime/swank-backend.lisp:1.29
--- slime/swank-backend.lisp:1.28	Sat Feb  7 14:28:41 2004
+++ slime/swank-backend.lisp	Sun Feb  8 14:19:42 2004
@@ -66,7 +66,6 @@
            #:debugger-info-for-emacs
            #:start-server
            #:startup-multiprocessing
-           #:startup-multiprocessing-for-emacs
            #:swank-compile-file
            #:swank-compile-string
            #:swank-macroexpand
@@ -147,8 +146,8 @@
 
 ;;;; TCP server
 
-(definterface create-socket (port)
-  "Create a listening TCP socket on port PORT.")
+(definterface create-socket (host port)
+  "Create a listening TCP socket on interface HOST and port PORT .")
 
 (definterface local-port (socket)
   "Return the local port number of SOCKET.")
@@ -494,9 +493,8 @@
   (:documentation
    "Return a short description and a list of (LABEL . VALUE) pairs."))
 
-(defgeneric describe-primitive-type (object)
-  (:documentation
-   "Return a string describing the primitive type of object."))
+(definterface describe-primitive-type (object)
+  "Return a string describing the primitive type of object.")
 
 
 ;;;; Multiprocessing


Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.62 slime/swank-cmucl.lisp:1.63
--- slime/swank-cmucl.lisp:1.62	Sat Feb  7 17:31:11 2004
+++ slime/swank-cmucl.lisp	Sun Feb  8 14:19:42 2004
@@ -9,13 +9,10 @@
 
 (setq *swank-in-background* :sigio)
 
-(defimplementation create-socket (port)
-  (let ((fd (ext:create-inet-listener port :stream
-                                      :reuse-address t
-                                      :host (resolve-hostname "localhost"))))
-    #+MP
-    ;;  (when *multiprocessing-enabled* (set-fd-non-blocking fd))
-    fd))
+(defimplementation create-socket (host port)
+  (ext:create-inet-listener 0 :stream
+                            :reuse-address t
+                            :host (resolve-hostname host)))
 
 (defimplementation local-port (socket)
   (nth-value 1 (ext::get-socket-host-and-port (socket-fd socket))))


Index: slime/swank-sbcl.lisp
diff -u slime/swank-sbcl.lisp:1.64 slime/swank-sbcl.lisp:1.65
--- slime/swank-sbcl.lisp:1.64	Sat Feb  7 17:29:54 2004
+++ slime/swank-sbcl.lisp	Sun Feb  8 14:19:42 2004
@@ -62,12 +62,16 @@
 
 (setq *swank-in-background* :sigio)
 
-(defimplementation create-socket (port)
+(defun resolve-hostname (name)
+  (car (sb-bsd-sockets:host-ent-addresses
+        (sb-bsd-sockets:get-host-by-name name))))
+
+(defimplementation create-socket (host port)
   (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 #(127 0 0 1) port)
+    (sb-bsd-sockets:socket-bind socket (resolve-hostname host) port)
     (sb-bsd-sockets:socket-listen socket 5)
     socket))
 


Index: slime/swank-allegro.lisp
diff -u slime/swank-allegro.lisp:1.13 slime/swank-allegro.lisp:1.14
--- slime/swank-allegro.lisp:1.13	Sat Feb  7 14:30:05 2004
+++ slime/swank-allegro.lisp	Sun Feb  8 14:19:42 2004
@@ -5,12 +5,8 @@
 ;;; Created 2003, Helmut Eller
 ;;;
 ;;; This code has been placed in the Public Domain.  All warranties
-;;; are disclaimed.
-;;;
-;;;   $Id: swank-allegro.lisp,v 1.13 2004/02/07 19:30:05 heller Exp $
-;;;
-;;; This code was written for 
-;;;   Allegro CL Trial Edition "5.0 [Linux/X86] (8/29/98 10:57)"
+;;; are disclaimed. This code was written for "Allegro CL Trial
+;;; Edition "5.0 [Linux/X86] (8/29/98 10:57)".
 ;;;  
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
@@ -36,8 +32,9 @@
 
 (setq *swank-in-background* :spawn)
 
-(defimplementation create-socket (port)
-  (socket:make-socket :connect :passive :local-port port :reuse-address t))
+(defimplementation create-socket (host port)
+  (socket:make-socket :connect :passive :local-port port 
+                      :local-host host :reuse-address t))
 
 (defimplementation local-port (socket)
   (socket:local-port socket))


Index: slime/swank-lispworks.lisp
diff -u slime/swank-lispworks.lisp:1.21 slime/swank-lispworks.lisp:1.22
--- slime/swank-lispworks.lisp:1.21	Sat Feb  7 14:30:05 2004
+++ slime/swank-lispworks.lisp	Sun Feb  8 14:19:42 2004
@@ -34,9 +34,9 @@
     (fixnum socket)
     (comm:socket-stream (comm:socket-stream-socket socket))))
 
-(defimplementation create-socket (port)
+(defimplementation create-socket (host port)
   (multiple-value-bind (socket where errno)
-      (comm::create-tcp-socket-for-service port :address "localhost")
+      (comm::create-tcp-socket-for-service port :address host)
     (cond (socket socket)
           (t (error 'network-error 
               :format-control "~A failed: ~A (~D)"


Index: slime/swank-openmcl.lisp
diff -u slime/swank-openmcl.lisp:1.62 slime/swank-openmcl.lisp:1.63
--- slime/swank-openmcl.lisp:1.62	Sun Feb  8 10:37:33 2004
+++ slime/swank-openmcl.lisp	Sun Feb  8 14:19:42 2004
@@ -71,8 +71,9 @@
 
 (setq *swank-in-background* :spawn)
 
-(defimplementation create-socket (port)
-  (ccl:make-socket :connect :passive :local-port port :reuse-address t))
+(defimplementation create-socket (host port)
+  (ccl:make-socket :connect :passive :local-port port 
+                   :local-host host :reuse-address t))
 
 (defimplementation local-port (socket)
   (ccl:local-port socket))


Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.16 slime/swank-clisp.lisp:1.17
--- slime/swank-clisp.lisp:1.16	Thu Feb  5 00:57:04 2004
+++ slime/swank-clisp.lisp	Sun Feb  8 14:19:42 2004
@@ -67,7 +67,8 @@
 
 (setq *swank-in-background* nil)
 
-(defimplementation create-socket (port)
+(defimplementation create-socket (host port)
+  (declare (ignore host))
   (socket:socket-server port))
 
 (defimplementation local-port (socket)





More information about the slime-cvs mailing list