Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Can I reduce the TIME_WAIT interval for closed sockets?: (3 Items)
   
Can I reduce the TIME_WAIT interval for closed sockets?  
I've got a client reusing a collection of 10 TCP sockets to connect/send data/close to a TCP server I'm running in 
Neutrino (6.4, so it's the io-pkt stuff)... If the client tries to reuse a socket that has already been used before some
 time interval expires (I'm assuming it's TIME_WAIT), the client's connection is refused...

The interval to reuse a socket *seems* like it's on the order of a minute or so...

Thoughts? Can I just bump the TIME_WAIT interval down to something lower? Is there any way to avoid TIME_WAIT altogether
 and close immediately?

MikeZ
RE: Can I reduce the TIME_WAIT interval for closed sockets?  
Hi Mike:

Can you use the SO_REUSEADDR socket option?
(e.g. http://www.unixguide.net/network/socketfaq/4.5.shtml )

	R.


-----Original Message-----
From: Mike Zinni [mailto:community-noreply@qnx.com] 
Sent: Thursday, November 20, 2008 3:09 PM
To: technology-networking
Subject: Can I reduce the TIME_WAIT interval for closed sockets?

I've got a client reusing a collection of 10 TCP sockets to connect/send
data/close to a TCP server I'm running in Neutrino (6.4, so it's the
io-pkt stuff)... If the client tries to reuse a socket that has already
been used before some time interval expires (I'm assuming it's
TIME_WAIT), the client's connection is refused...

The interval to reuse a socket *seems* like it's on the order of a
minute or so...

Thoughts? Can I just bump the TIME_WAIT interval down to something
lower? Is there any way to avoid TIME_WAIT altogether and close
immediately?

MikeZ

_______________________________________________
Technology
http://community.qnx.com/sf/go/post17004
Re: RE: Can I reduce the TIME_WAIT interval for closed sockets?  
Turns out that this was an issue with the client utility that's used to test our server's functionality. It reuses a set
 of 10 ports, but doesn't have the ability to set the SO_REUSEADDR option (LabVIEW is great, isn't it?!)...

So, combine that with my unfortunate choice to use a short interval between connections, and you've got the recipe for 
hunting a non-issue for a day or two...

Thanks for the help regardless...

MikeZ