Simon IJskes - QCG wrote:
On 10-11-12 12:51, Peter Firmstone wrote:
Why did you not use ServerSocket.setReuseAddress(true)?
3. You can't reconnect to the same remote TCP IP address during the
TIME_WAIT period.
Which caveat are you refering to? TIME_WAIT? You mean at the client
side? Shouldnt the client get an ephemeral port for the next connection?
This new port number ensures a unique association 5-tuple. (Stevens,
1990, Unix network programming, Section 5.2)
I've never had problems with SO_REUSEADDR! It is in use for EVERY
server bound to a fixed port on this planet, isn't it?
It's set to true for most Unix platforms, as far as I'm aware.
If the client side remotely closes the ServerSocket, then there's no
TIME_WAIT period, it's only when the ServerSocket is closed by the server.
I'm kinda stretched for time right now, I'll go into more depth for you
later this week if you need me to.