Re: socket connection not being reset correctly




"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


.



Relevant Pages

  • Re: modem communication
    ... >i always wanted to use sockets for the communications, ... will answer on the first ring and establish a tcp/ip connection ... The link below has some info to give you an idea on the setup. ...
    (sci.electronics.design)
  • Re: 3 PC SOHO Network setup problem
    ... As I say below, my setup should ... >>so security on the wireless side is not a major concern. ... no PC has an internet connection other than through the router. ... > only by the Guest account, which means this computer will be open to anyone. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Specified network name is no longer available
    ... ISP says nothing wrong with the connection.. ... Also it works just fine if the guys make a dial up VPN connection to ... On it's own the SBS2003 server worked well, ... So Site B was setup. ...
    (microsoft.public.windows.server.sbs)
  • Re: [SLE] cannot setup DSL/pppoe connect for no available etihernet connection (but I do have)
    ... I am trying to setup a PPPoE connection and according to the ... I setup my ethernet card (a built-in Interl card driven by e1000 ... >The first step is to check if you can access the modem. ...
    (SuSE)
  • Re: Socket communication on multihomed box
    ... LAN route before USB ... The thing is that connection MUST always stay open. ... as for sockets, I'm using native syscalls, not MFC. ... Another thing is that is should work both under Linux and Windows. ...
    (microsoft.public.win32.programmer.networks)