[usocket-cvs] r243 - usocket/trunk/backend

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Thu May 17 21:21:11 UTC 2007


Author: ehuelsmann
Date: Thu May 17 17:21:11 2007
New Revision: 243

Modified:
   usocket/trunk/backend/armedbear.lisp
Log:
Add cl-smtp 'requirement': get-host-name (ArmedBear backend).

Modified: usocket/trunk/backend/armedbear.lisp
==============================================================================
--- usocket/trunk/backend/armedbear.lisp	(original)
+++ usocket/trunk/backend/armedbear.lisp	Thu May 17 17:21:11 2007
@@ -17,6 +17,14 @@
   `(java:jnew (java:jconstructor ,class , at arg-spec)
          , at args))
 
+(defun get-host-name ()
+  (let ((localAddress (java:jstatic
+                       (java:jmethod "java.net.InetAddress"
+                                     "getLocalHost")
+                       (java:jclass "java.net.InetAddress"))))
+    (java:jcall (java:jmethod "java.net.InetAddress" "getHostName")
+                localAddress)))
+
 (defun handle-condition (condition &optional socket)
   (typecase condition
     (error (error 'unknown-error :socket socket :real-error condition))))



More information about the usocket-cvs mailing list