Hi, usocket developer
I think there's two bugs in usocket trunk's backend/lispworks.lisp
1. in function USOCKET-LISTEN, you should listen the stream of a usocket, not the socket fd itself:
(defun usocket-listen (usocket) (if (stream-usocket-p usocket) (when (listen (socket-stream usocket)) usocket) (when (comm::socket-listen (socket usocket)) usocket)))
2. in function #-win32 WAIT-FOR-INPUT-INTERNAL, mapcar didn't have a :KEY keyword:
#-win32 (defun wait-for-input-internal (sockets &key timeout) (with-mapped-conditions () ;; unfortunately, it's impossible to share code between ;; non-win32 and win32 platforms... ;; Can we have a sane -pref. complete [UDP!?]- API next time, please? (mapcar #'(lambda (x) (mp:notice-fd (os-socket-handle x))) sockets) (mp:process-wait-with-timeout "Waiting for a socket to become active" (truncate timeout) #'(lambda (socks) (some #'usocket-listen socks)) sockets) (mapcar #'(lambda (x) (mp:unnotice-fd (os-socket-handle x))) sockets) (remove nil (mapcar #'usocket-listen sockets))))
Hope them can be merged. Thanks.
Chun Tian (binghe)