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

Chun Tian (binghe) ctian at common-lisp.net
Wed Sep 15 04:19:02 UTC 2010


Author: ctian
Date: Wed Sep 15 00:19:01 2010
New Revision: 560

Log:
Fixed legacy reuseaddress argument for MCL and ABCL; Add CHANGES; Update TODO.

Added:
   usocket/trunk/CHANGES
Modified:
   usocket/trunk/TODO
   usocket/trunk/backend/abcl.lisp
   usocket/trunk/backend/mcl.lisp
   usocket/trunk/usocket-test.asd

Added: usocket/trunk/CHANGES
==============================================================================
--- (empty file)
+++ usocket/trunk/CHANGES	Wed Sep 15 00:19:01 2010
@@ -0,0 +1,7 @@
+0.5.0:
+
+* New supported platform: Macintosh Common Lisp (5.0 and up, plus RMCL)
+* Support for UDP (datagram-usocket) was added (for all supported platform except MCL)
+* Add WAIT-FOR-INPUT support for SBCL and ECL on win32.
+* Simple TCP and UDP server API: SOCKET-SERVER
+* Lots of bug fixed since 0.4.1

Modified: usocket/trunk/TODO
==============================================================================
--- usocket/trunk/TODO	(original)
+++ usocket/trunk/TODO	Wed Sep 15 00:19:01 2010
@@ -1,17 +1,4 @@
-
-- Implement wait-for-input-internal for
-    * SBCL Win32
-
-- Implement errors for (the alien interface code of)
-    * SBCL Unix
-    * CMUCL Unix
-    * OpenMCL
-
-
-- Extend ABCL socket support with the 4 java errors in java.net.*
-  so that they can map to our usocket errors instead of mapping
-  all errors to unknown-error.
-
+- Fix condition systems (make all implementation generate same error)
 - Add INET6 support.
 
 For more TODO items, see http://trac.common-lisp.net/usocket/report.

Modified: usocket/trunk/backend/abcl.lisp
==============================================================================
--- usocket/trunk/backend/abcl.lisp	(original)
+++ usocket/trunk/backend/abcl.lisp	Wed Sep 15 00:19:01 2010
@@ -231,15 +231,16 @@
 
 ;;; SOCKET-LISTEN
 
-(defun socket-listen (host port &key (element-type 'character)
+(defun socket-listen (host port &key reuseaddress
                       (reuse-address nil reuse-address-supplied-p)
-		      (backlog 5 backlog-supplied-p))
+		      (backlog 5 backlog-supplied-p)
+		      (element-type 'character))
   (declare (type boolean reuse-address))
-  (let* ((channel (jstatic $@open/ServerSocketChannel/0 $*ServerSocketChannel))
+  (let* ((reuseaddress (if reuse-address-supplied-p reuse-address reuseaddress))
+	 (channel (jstatic $@open/ServerSocketChannel/0 $*ServerSocketChannel))
 	 (socket (jcall $@socket/ServerSocketChannel/0 channel))
 	 (endpoint (jnew $%InetSocketAddress/2 (host-to-inet4 host) (or port 0))))
-    (when reuse-address-supplied-p
-      (jcall $@setReuseAddress/1 socket (if reuse-address +java-true+ +java-false+)))
+    (jcall $@setReuseAddress/1 socket (if reuseaddress +java-true+ +java-false+))
     (with-mapped-conditions (socket)
       (if backlog-supplied-p
 	  (jcall $@bind/ServerSocket/2 socket endpoint backlog)

Modified: usocket/trunk/backend/mcl.lisp
==============================================================================
--- usocket/trunk/backend/mcl.lisp	(original)
+++ usocket/trunk/backend/mcl.lisp	Wed Sep 15 00:19:01 2010
@@ -94,13 +94,13 @@
                            (reuse-address nil reuse-address-supplied-p)
                            (backlog 5)
                            (element-type 'character))
-  (declare (ignore reuseaddress reuse-address-supplied-p))
-  (let ((socket (with-mapped-conditions ()
-                  (make-instance 'passive-socket 
-                    :local-port port
-                    :local-host host
-                    :reuse-address reuse-address
-                    :backlog backlog))))
+  (let* ((reuseaddress (if reuse-address-supplied-p reuse-address reuseaddress))
+	 (socket (with-mapped-conditions ()
+		   (make-instance 'passive-socket 
+				  :local-port port
+				  :local-host host
+				  :reuse-address reuseaddress
+				  :backlog backlog))))
     (make-stream-server-socket socket :element-type element-type)))
 
 (defmethod socket-accept ((usocket stream-server-usocket) &key element-type)

Modified: usocket/trunk/usocket-test.asd
==============================================================================
--- usocket/trunk/usocket-test.asd	(original)
+++ usocket/trunk/usocket-test.asd	Wed Sep 15 00:19:01 2010
@@ -23,7 +23,9 @@
     :components ((:module "test"
 		  :components ((:file "package")
 			       (:file "test-usocket"
-				      :depends-on ("package"))))))
+				      :depends-on ("package"))
+			       (:file "test-condition"
+				      :depends-on ("test-usocket"))))))
 
 (defmethod perform ((op test-op) (c (eql (find-system :usocket-test))))
   (funcall (intern "DO-TESTS" "USOCKET-TEST")))




More information about the usocket-cvs mailing list