> Yes, the socket is in the twice maximum segment lifetime state,
> if memory serves me. This wait is to ensure that any old packets
> are no longer around to confuse a new connection. You should do a
> setsockopt(... SO_REUSEADDR, ...) to allow the address to be reused
> (violating the IP rules), or you should make sure your
> server shuts down
> the socket gracefully when interrupted.
Another side effect to watch out for is that if you had a connection
to the client and you aborted instead of gracefully shutting down both
ends, the socket could be stuck in TIME_WAIT or FIN_WAIT2 for some
time, if you don't use SO_REUSEADDR. SO_REUSEADDR is "yuck" and you
should avoid it and instead find graceful means of solving the
problem.
Watch out if you need your program to be portable and if it needs to
be ported across various *nixs. HPUX is an absolute pain for socket
timeouts, AIX has an utility called 'no' for tunning the vars, and I
think in Solaris it takes longer than 2 mins. The problem is also
exacerbated if you client comes from a non-standard TCP/IP stack. A
Unix m/c or recent versions of Win* are no problems, but some old
Firefox stacks and VMS ones potentially don't let go of the socket.
-- Aravind
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text