[usocket-devel] patch: adding *remote-host* *remote-port* to socket-server stream handler functions
Matthew Curry
mjcurry at gmail.com
Thu Nov 10 18:41:13 UTC 2011
Hi all:
I had a need to know the remote socket and port for a tcp connection,
however the socket-server handler function did not have *remote-host*
and *remote-port* set (oddly it does set these for datagram sockets).
socket-server is mostly what I want, save this feature, which I have
modified the sources locally.
If it's alright with the devs, could this simple patch be committed to
the server.lisp file in the usocket tree?
Thanks,
-Matt
-------------- next part --------------
83c83,84
< (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))
More information about the usocket-devel
mailing list