[usocket-cvs] r678 - usocket/branches/0.5.x

ctian at common-lisp.net ctian at common-lisp.net
Fri Nov 11 01:40:54 UTC 2011


Author: ctian
Date: Thu Nov 10 17:40:53 2011
New Revision: 678

Log:
[server] adding *remote-host* *remote-port* to socket-server stream handler functions (suggested by Matthew Curry)

Modified:
   usocket/branches/0.5.x/server.lisp

Modified: usocket/branches/0.5.x/server.lisp
==============================================================================
--- usocket/branches/0.5.x/server.lisp	Sat Oct  1 07:52:12 2011	(r677)
+++ usocket/branches/0.5.x/server.lisp	Thu Nov 10 17:40:53 2011	(r678)
@@ -80,7 +80,8 @@
                        &key element-type multi-threading)
   (let ((real-function #'(lambda (client-socket &rest arguments)
                            (unwind-protect
-                               (apply function (socket-stream client-socket) arguments)
+                               (multiple-value-bind (*remote-host* *remote-port*) (get-peer-name client-socket)
+				 (apply function (socket-stream client-socket) arguments))
                              (close (socket-stream client-socket))
                              (socket-close client-socket)
                              nil))))




More information about the usocket-cvs mailing list