The challenge sockopt-reuse-addressdoes not seem to have any 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)
An attempt to bind to the same port causes 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?
source
share