[closure-cvs] CVS closure/src/glisp

dlichteblau dlichteblau at common-lisp.net
Tue Jan 2 13:13:03 UTC 2007


Update of /project/closure/cvsroot/closure/src/glisp
In directory clnet:/tmp/cvs-serv24908/src/glisp

Modified Files:
	dep-acl.lisp dep-clisp.lisp dep-cmucl.lisp dep-openmcl.lisp 
	dep-sbcl.lisp dep-scl.lisp package.lisp util.lisp 
Log Message:

Removed open-inet-socket from dep-*.

Move g/open-inet-socket from glisp into net/.
[Its :char case was never being used, all implementations used :byte.]

Depend on trivial-sockets to create the socket.  Usocket seems to be
better maintained, but has trivial-sockets compatibility and our socket
needs are "trivial" right now.


--- /project/closure/cvsroot/closure/src/glisp/dep-acl.lisp	2007/01/02 12:50:39	1.6
+++ /project/closure/cvsroot/closure/src/glisp/dep-acl.lisp	2007/01/02 13:12:58	1.7
@@ -32,13 +32,6 @@
 (defun glisp::read-char-sequence (&rest ap)
   (apply #'read-sequence ap))
 
-(defun glisp::open-inet-socket (hostname port)
-  (values
-   (socket:make-socket :remote-host hostname 
-                       :remote-port port 
-                       :format :binary)
-   :byte))
-
 (defmacro glisp::with-timeout ((&rest options) &body body)
   `(mp:with-timeout ,options . ,body))
 
--- /project/closure/cvsroot/closure/src/glisp/dep-clisp.lisp	2007/01/02 12:54:00	1.7
+++ /project/closure/cvsroot/closure/src/glisp/dep-clisp.lisp	2007/01/02 13:12:58	1.8
@@ -35,11 +35,6 @@
   `(progn
      , at body))
 
-(defun glisp::open-inet-socket (hostname port)
-  (values
-   (lisp:socket-connect port hostname)
-   :byte))
-
 (defun glisp::g/make-string (length &rest options)
   (apply #'make-array length 
          :element-type 
--- /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp	2007/01/02 12:54:00	1.7
+++ /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp	2007/01/02 13:12:58	1.8
@@ -61,16 +61,6 @@
   `(progn
      , at body))
 
-(defun glisp::open-inet-socket (hostname port)
-  (let ((fd (extensions:connect-to-inet-socket hostname port)))
-    (values
-     (sys:make-fd-stream fd
-                         :input t
-                         :output t
-                         :element-type '(unsigned-byte 8)
-                         :name (format nil "Network connection to ~A:~D" hostname port))
-     :byte)))
-
 (defun glisp::g/make-string (length &rest options)
   (apply #'make-array length :element-type 'base-char options))
 
--- /project/closure/cvsroot/closure/src/glisp/dep-openmcl.lisp	2007/01/02 12:54:00	1.6
+++ /project/closure/cvsroot/closure/src/glisp/dep-openmcl.lisp	2007/01/02 13:12:58	1.7
@@ -37,19 +37,9 @@
   `(progn
      , at body))
 
-(defun glisp::open-inet-socket (hostname port)
-  (values
-   (ccl::make-socket :address-family :internet
-		     :type :stream
-		     :remote-host hostname
-		     :remote-port port)
-   :byte))
-
 (defun glisp::g/make-string (length &rest options)
   (apply #'make-array length :element-type 'base-char options))
 
-
-
 (defun glisp::run-unix-shell-command (command)
   (nth-value 1 (ccl:external-process-status
    (ccl:run-program "/bin/sh" (list "-c" command) :wait t :input nil
--- /project/closure/cvsroot/closure/src/glisp/dep-sbcl.lisp	2007/01/02 12:54:00	1.7
+++ /project/closure/cvsroot/closure/src/glisp/dep-sbcl.lisp	2007/01/02 13:12:58	1.8
@@ -37,25 +37,9 @@
   `(progn
      , at body))
 
-(defun glisp::open-inet-socket (hostname port)
-  (values
-   (sb-bsd-sockets:socket-make-stream 
-    (let ((host (car (sb-bsd-sockets:host-ent-addresses
-		      (sb-bsd-sockets:get-host-by-name hostname)))))
-      (when host
-	(let ((s (make-instance 'sb-bsd-sockets:inet-socket
-				:type :stream :protocol :tcp)))
-	  (sb-bsd-sockets:socket-connect s host port)
-	  s)))
-    :element-type '(unsigned-byte 8)
-    :input t :output t)
-   :byte))
-
 (defun glisp::g/make-string (length &rest options)
   (apply #'make-array length :element-type 'character options))
 
-
-
 (defun glisp::run-unix-shell-command (command)
   (sb-impl::process-exit-code
    (sb-ext:run-program "/bin/sh" (list "-c" command) :wait t :input nil
--- /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp	2007/01/02 12:50:39	1.4
+++ /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp	2007/01/02 13:12:58	1.5
@@ -61,16 +61,6 @@
   `(progn
      , at body))
 
-(defun glisp::open-inet-socket (hostname port)
-  (let ((fd (extensions:connect-to-inet-socket hostname port)))
-    (values
-     (sys:make-fd-stream fd
-                         :input t
-                         :output t
-                         :element-type '(unsigned-byte 8)
-                         :name (format nil "Network connection to ~A:~D" hostname port))
-     :byte)))
-
 (defun glisp::g/make-string (length &rest options)
   (apply #'make-array length :element-type 'base-char options))
 
--- /project/closure/cvsroot/closure/src/glisp/package.lisp	2007/01/02 12:54:00	1.10
+++ /project/closure/cvsroot/closure/src/glisp/package.lisp	2007/01/02 13:12:58	1.11
@@ -33,7 +33,7 @@
   (:export "DEFSUBST"
 	   "G/MAKE-STRING"
 	   "WITH-TIMEOUT"
-	   "OPEN-INET-SOCKET"
+
 	   ;; util.lisp :
 	   "ALWAYS"
 	   "CL-BYTE-STREAM"
@@ -87,7 +87,6 @@
 
 	   "CL-BYTE-STREAM->GSTREAM"
 	   "CL-CHAR-STREAM->GSTREAM"
-	   "G/OPEN-INET-SOCKET"
 
 	   "FIND-TEMPORARY-FILE"
 	   "DELETE-TEMPORARY-FILE"
--- /project/closure/cvsroot/closure/src/glisp/util.lisp	2007/01/02 12:54:00	1.7
+++ /project/closure/cvsroot/closure/src/glisp/util.lisp	2007/01/02 13:12:58	1.8
@@ -671,14 +671,6 @@
 (defun cl-char-stream->gstream (stream)
   (make-instance 'cl-char-stream :cl-stream stream))
 
-(defun g/open-inet-socket (&rest args)
-  (multiple-value-bind (stream kind) (apply #'open-inet-socket args)
-    (ecase kind
-      #-CMU
-      (:char (cl-char-stream->gstream stream))
-      (:byte (cl-byte-stream->gstream stream)) )))
-
-
 ;;; ----------------------------------------------------------------------------------------------------
 
 (defvar *all-temporary-files* nil




More information about the Closure-cvs mailing list