Re: Should a socket client detect loss of network connection



That "apart from" statement answers your question. It's the only
way.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Angus" <nospam@xxxxxxxxx> wrote in message
news:ewX3O44eHHA.4136@xxxxxxxxxxxxxxxxxxxxxxx
Thank you, I have checked with the client and it is a router causing this
problem. So what you suggest sounds like the easiest solution.

It would be most convenient if the client could 'detect' that the
connection
'session' was no longer valid. Is there any way of checking this apart
from
sending data to the server? I assume not.

Angus




"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:uXVPrbseHHA.5052@xxxxxxxxxxxxxxxxxxxxxxx
Sounds like a NAT router in between dropping its TCP binidings
for your connection due to inactivity. You must include some sort
of keep-alive mechanism in your protocol in case of regular data
inactivity, otherwise you are subject to the NAT router issue.
BTW, before you ask there's no standard threshold when a NAT
router considers a TCP connection inactive. Personally I wouldn't
trust a conection with 5 minutes inactivity alive through a NAT router.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Angus" <nospam@xxxxxxxxx> wrote in message
news:uicy3KseHHA.5056@xxxxxxxxxxxxxxxxxxxxxxx
Hello

I have written a socket client and a server. When I test on my test
system
it seems to work fine. But a user has reported that if they leave the
system running with no activity for over an hour then the server stops
sending data to the client.

I have setup on a test system on different computers and I don't see
this
problem after one hour. Most of the activity is server to client.

So in my testing I tried taking the ethernet cable out of the server
PC.
Neither my server or client seemed to detect this. Should they be able
to?
If so how?

Has anyone seen this type of problem? Any ideas on how to troubleshoot
it
and resolve? It is only a problem apparently after a long period of
inactivity. If there is data sent from server to client within a
reasonable
period there is no problem. I think if the user goes to lunch (or away
for
a period) then the way the system works there would be no data from the
server. If they get back after an hour or so then they need to
re-connect
from client to see any further data communication.

Angus









.



Relevant Pages


Loading