[usocket-devel] socket-listen and socket-accept

Hans Hübner hans.huebner at gmail.com
Sun Aug 9 09:31:39 UTC 2009


On Fri, Aug 7, 2009 at 22:19, Shawn Betts<sabetts at 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




More information about the usocket-devel mailing list