Re: socket connection not being reset correctly
- From: "Allan Bruce" <amb@xxxxxxx>
- Date: Fri, 22 Jul 2005 09:53:57 +0100
"Gordon Beaton" <not@xxxxxxxxx> wrote in message
news:42e0ae75$1@xxxxxxxxxxxxxxxxxx
> On Fri, 22 Jul 2005 09:05:57 +0100, Allan Bruce wrote:
>> I have found that netstat reckons the connections are still up, so
>> is it my JVM thats causing the problem? Or can I setup the sockets
>> in a way for them to not display this behaviour?
>
> Unplugging a cable should not normally cause a socket connection to
> terminate, and this has absolutely nothing to do with Java. TCP was
> designed to be resilient and will handle intermittent network
> interruptions. Consider also how your computer should detect an
> unplugged cable somewhere else along your communication route, not
> directly attached to either of your computers.
>
> If your application really needs to detect this situation, you should
> add something like a heartbeat message to your protocol. If you don't
> get a response within a certain timeout, assume the network is down.
>
> /gordon
>
We do have this implemented however windows does have this behaviour, when
it tries to send something on a broken connection it causes an error and the
socket can then be closed. This was the case when Java was running on the
windows box, but now on Linux the behaviour is different. Perhaps I should
direct my question to a linux group? But I thought it could be something to
do with the JVM options or there may be a way to setup sockets to the way I
want.
Allan
.
- References:
- socket connection not being reset correctly
- From: Allan Bruce
- Re: socket connection not being reset correctly
- From: Alan Krueger
- Re: socket connection not being reset correctly
- From: Allan Bruce
- Re: socket connection not being reset correctly
- From: Gordon Beaton
- socket connection not being reset correctly
- Prev by Date: Re: socket connection not being reset correctly
- Next by Date: unloading the native library from applet.
- Previous by thread: Re: socket connection not being reset correctly
- Next by thread: how to set time to allow servlet finish process before forward
- Index(es):
Relevant Pages
|