On Fri, Aug 7, 2009 at 22:19, Shawn Bettssabetts@gmail.com wrote:
How does one poll a server socket created with socket-listen to see if there's an incoming connection? I want to run socket-accept in that case but I can't block because my program is busy doing other stuff. I've tried wait-for-input but it always returns the server socket (lispworks & sbcl) despite there not being any pending connection.
USOCKET:WAIT-FOR-INPUT is the way to go and it works for me with SBCL 1.0.29 and FreeBSD 7.2. It should work on all platforms, but you might need to use a recent version of usocket. Please see the usocket home page (http://common-lisp.net/project/usocket/) for instructions how to check out Subversion trunk of the library. If you still can't get it to run, please post some more information on what you're trying to do and how.
-Hans