[usocket-cvs] r548 - in usocket/trunk: . backend

Chun Tian (binghe) ctian at common-lisp.net
Mon Jul 19 11:49:58 UTC 2010


Author: ctian
Date: Mon Jul 19 07:49:57 2010
New Revision: 548

Log:
Cleaned MCL test code.

Modified:
   usocket/trunk/backend/mcl.lisp   (contents, props changed)
   usocket/trunk/usocket.asd

Modified: usocket/trunk/backend/mcl.lisp
==============================================================================
--- usocket/trunk/backend/mcl.lisp	(original)
+++ usocket/trunk/backend/mcl.lisp	Mon Jul 19 07:49:57 2010
@@ -1,3 +1,6 @@
+;;;; $Id$
+;;;; $URL$
+
 ;; MCL backend for USOCKET 0.4.1
 ;; Terje Norderhaug <terje at in-progress.com>, January 1, 2009
 
@@ -264,106 +267,3 @@
 	 #'ready-sockets
 	 (wait-list-waiters wait-list)))
       (nreverse result))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-#| Test for wait-for-input
-(let* ((sock1 (usocket:socket-connect "in-progress.com" 80))
-      (sock2 (usocket:socket-connect "common-lisp.net" 80))
-      (sockets (list sock1 sock2)))
- (dolist (sock sockets)
-   (format (usocket:socket-stream sock)
-           "GET / HTTP/1.0~A~A~A~A"
-           #\Return #\Linefeed #\Return #\Linefeed)
-   (force-output (usocket:socket-stream sock)))
- (wait-for-input sockets :timeout 5000))
-|#
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-#| TEST (from test-usocket.lisp)
-
-
-(defparameter +non-existing-host+ "192.168.1.1")
-(defparameter +unused-local-port+ 15213)
-(defparameter *soc1* (usocket::make-stream-socket :socket :my-socket
-                                                  :stream :my-stream))
-(defparameter +common-lisp-net+ #(208 72 159 207)) ;; common-lisp.net IP
-
-
-(usocket:socket *soc1*)
-
-(usocket:socket-connect "127.0.0.0" +unused-local-port+)
-
-(usocket:socket-connect #(127 0 0 0) +unused-local-port+)
-
-(usocket:socket-connect 2130706432 +unused-local-port+)
-
-    (let ((sock (usocket:socket-connect "common-lisp.net" 80)))
-      (unwind-protect
-          (typep sock 'usocket:usocket)
-        (usocket:socket-close sock)))
-
-    (let ((sock (usocket:socket-connect +common-lisp-net+ 80)))
-      (unwind-protect
-          (typep sock 'usocket:usocket)
-        (usocket:socket-close sock)))
-
-    (let ((sock (usocket:socket-connect (usocket::host-byte-order +common-lisp-net+) 80)))
-      (unwind-protect
-          (typep sock 'usocket:usocket)
-        (usocket:socket-close sock)))
-
-(let ((sock (usocket:socket-connect "common-lisp.net" 80)))
-      (unwind-protect
-          (progn
-            (format (usocket:socket-stream sock)
-                    "GET / HTTP/1.0~A~A~A~A"
-                    #\Return #\Linefeed #\Return #\Linefeed)
-            (force-output (usocket:socket-stream sock))
-            (read-line (usocket:socket-stream sock)))
-        (usocket:socket-close sock)))
-
-    (let ((sock (usocket:socket-connect +common-lisp-net+ 80)))
-      (unwind-protect
-          (usocket::get-peer-address sock)
-        (usocket:socket-close sock)))
-
-    (let ((sock (usocket:socket-connect +common-lisp-net+ 80)))
-      (unwind-protect
-          (usocket::get-peer-port sock)
-        (usocket:socket-close sock)))
-
-    (let ((sock (usocket:socket-connect +common-lisp-net+ 80)))
-      (unwind-protect
-          (usocket::get-peer-name sock)
-        (usocket:socket-close sock)))
-
-    (let ((sock (usocket:socket-connect +common-lisp-net+ 80)))
-      (unwind-protect
-          (usocket::get-local-address sock)
-        (usocket:socket-close sock)))
-
-|#
-
-
-#|
-
-(defun socket-server (host port)
-  (let ((socket (socket-listen host port)))
-    (unwind-protect
-      (loop
-        (with-open-stream (stream (socket-stream (socket-accept socket))) 
-          (ccl::telnet-write-line stream "~A" 
-           (reverse (ccl::telnet-read-line stream)))
-          (ccl::force-output stream)))
-      (close socket))))
-
-(ccl::process-run-function "Socket Server" #'socket-server NIL 4088)
-
-(let* ((sock (socket-connect nil 4088))
-       (stream (usocket:socket-stream sock)))
-  (assert (streamp stream))
-  (ccl::telnet-write-line stream "hello ~A" (random 10))
-  (ccl::force-output stream)
-  (ccl::telnet-read-line stream))
-
-|#

Modified: usocket/trunk/usocket.asd
==============================================================================
--- usocket/trunk/usocket.asd	(original)
+++ usocket/trunk/usocket.asd	Mon Jul 19 07:49:57 2010
@@ -4,12 +4,12 @@
 
 ;;;; See the LICENSE file for licensing information.
 
-(in-package #:cl-user)
+(in-package :cl-user)
 
-(defpackage #:usocket-system
-    (:use #:cl #:asdf))
+(defpackage usocket-system
+    (:use :cl :asdf))
 
-(in-package #:usocket-system)
+(in-package :usocket-system)
 
 (defsystem usocket
     :name "usocket"




More information about the usocket-cvs mailing list