On 11 June 2011 04:05, Vijay Mathew <vijay.the.schemer@...> wrote:
> The call to sockopt-reuse-address seems to have no effect.
> (setf socket (make-instance 'sb-bsd-sockets:inet-socket
> :type type :protocol protocol)
> (setf (sb-bsd-sockets:sockopt-reuse-address socket) t)
> (setf (sb-bsd-sockets:non-blocking-mode socket) t)
> (sb-bsd-sockets:socket-bind socket ip port)
> (sb-bsd-sockets:socket-listen socket backlog)
> Attempt to rebind to the same port raises the following error:
> Socket error in "bind": EADDRINUSE (Address already in use)
> [Condition of type SB-BSD-SOCKETS:ADDRESS-IN-USE-ERROR]
> What am I doing wrong?
Perhaps you're looking for SO_REUSEPORT? (Which, embarrassingly,
SB-BSD-SOCKETS doesn't appear to support right now.)