Subject: Re: [Solved] Working with sb-bsd-sockets
From: rpw3@rpw3.org (Rob Warnock)
Date: Mon, 22 Oct 2007 21:39:52 -0500
Newsgroups: comp.lang.lisp
Message-ID: <auSdnfMpQdplw4DanZ2dnUVZ_sejnZ2d@speakeasy.net>
George Neuner  <gneuner2/@/comcast.net> wrote:
+---------------
| The right solution is to set SO_REUSEADDR on your listen socket before
| you bind it.  Your solution using GC may or may not be either reliable
| or portable - the problem is in the OS's TCP implementation and
| whether any Lisp can clean it up depends on the socket library and how
| it interfaces to the OS.
+---------------

Yup. I've run into this one before myself. Fortunately, the CMUCL
socket stuff -- and thus one would assume "sb-bsd-sockets" as well --
provides a :REUSE-ADDRESS keyword on the CREATE-INET-LISTENER function.
Just set it to T, and it will do the proper "setsockopt()" on the
"listen()" file descriptor for you.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607