11 Jun 2011 03:05
Socket reuse-address problem
Vijay Mathew <vijay.the.schemer <at> gmail.com>
2011-06-11 01:05:57 GMT
2011-06-11 01:05:57 GMT
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?
Thank you,
--Vijay
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
RSS Feed