[usocket-cvs] r93 - in usocket/trunk: . backend doc
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Mon Feb 13 20:48:39 UTC 2006
Author: ehuelsmann
Date: Mon Feb 13 14:48:39 2006
New Revision: 93
Modified:
usocket/trunk/TODO
usocket/trunk/backend/armedbear.lisp
usocket/trunk/doc/backends.txt
Log:
Expand TODO.
Modified: usocket/trunk/TODO
==============================================================================
--- usocket/trunk/TODO (original)
+++ usocket/trunk/TODO Mon Feb 13 14:48:39 2006
@@ -2,10 +2,13 @@
- Check consistency of error translation for each of the backends
with the design document.
+- check stream creation arguments such as element-type and external-format
+ for availability in the different lisps.
+
- Move all function documentation from the backends to
(setf documentation) forms in usocket.lisp.
-- Extend ABCL socket support with the 4 java errors in java.net
+- 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.
Modified: usocket/trunk/backend/armedbear.lisp
==============================================================================
--- usocket/trunk/backend/armedbear.lisp (original)
+++ usocket/trunk/backend/armedbear.lisp Mon Feb 13 14:48:39 2006
@@ -22,3 +22,33 @@
(defmethod socket-close ((usocket usocket))
(with-mapped-conditions (usocket)
(ext:socket-close (socket usocket))))
+
+
+#.(if (find-symbol "SOCKET-LOCAL-ADDRESS" :ext)
+ ;; abcl 0.0.9 compat code
+ '(progn
+ (declaim (inline %socket-address %socket-port))
+ (defun %socket-address (socket addressName)
+ (java:jcall "getHostAddress" (java:jcall-raw addressName socket)))
+
+ (defun %socket-port (socket portName)
+ (java:jcall portName socket))
+
+
+
+ (defun socket-local-address (socket)
+ "Returns the local address of the given socket as a dotted quad string."
+ (%socket-address socket "getLocalAddress"))
+
+ (defun socket-peer-address (socket)
+ "Returns the peer address of the given socket as a dotted quad string."
+ (%socket-address socket "getInetAddress"))
+
+ (defun socket-local-port (socket)
+ "Returns the local port number of the given socket."
+ (%socket-port socket "getLocalPort"))
+
+ (defun socket-peer-port (socket)
+ "Returns the peer port number of the given socket."
+ (%socket-port socket "getPort")))
+ '(progn))
Modified: usocket/trunk/doc/backends.txt
==============================================================================
--- usocket/trunk/doc/backends.txt (original)
+++ usocket/trunk/doc/backends.txt Mon Feb 13 14:48:39 2006
@@ -7,16 +7,21 @@
Each backend should implement:
-Sockets functions:
+Functions:
+ - handle-condition
- socket-connect
+ - get-hosts-by-name [ optional ]
+ - get-host-by-address [ optional ]
-Sockets methods:
+Methods:
- socket-close
+
+
An error-handling function, resolving implementation specific errors
to this list of errors:
More information about the usocket-cvs
mailing list