Hi, James
Your patch was accepted. Actually I consider it as a bug, because we does have HOST-TO-HOSTNAME translations in SOCKET-CONNECT function on CCL, but we forget to do the same thing in SOCKET-LISTEN. This is also partly because I personally do UDP much than TCP so that I call SOCKET-LISTEN rarely.
Any way, thanks very much! I've committed your change as revision 547 in USOCKET trunk.
Regards,
Chun Tian (binghe)
在 2011-2-1,22:26, James Ashley 写道:
This stupid-simple patch lets you pass a wider variety of address specifications into socket-listen (Clozure's make-socket seems to require either an int or a string address).
Well, I think it does, and I don't think it has much performance implications. But I'm a CL noob, and I won't pretend to know all that much about socket programming, so I could be totally wrong about this.
Thanks, James
--- backend/openmcl.lisp~ 2011-01-13 18:57:39.000000000 -0600 +++ backend/openmcl.lisp 2011-01-30 10:11:39.000000000 -0600 @@ -118,6 +118,7 @@ (backlog 5) (element-type 'character)) (let* ((reuseaddress (if reuse-address-supplied-p reuse-address reuseaddress))
(real-host (host-to-hostname host)) (sock (with-mapped-conditions () (apply #'openmcl-socket:make-socket (append (list :connect :passive
@@ -126,7 +127,7 @@ :backlog backlog :format (to-format element-type)) (when (ip/= host *wildcard-host*)
(list :local-host host)))))))
(make-stream-server-socket sock :element-type element-type)))(list :local-host real-host)))))))
(defmethod socket-accept ((usocket stream-server-usocket) &key element-type)
usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel