Article View: borland.public.cppbuilder.internet.socket
Article #3145Re: Detecting lost connections
From: chenzero
Date: Sun, 06 Nov 2005 02:28
Date: Sun, 06 Nov 2005 02:28
23 lines
1943 bytes
1943 bytes
"Eelke" <e.klein@mplussoftware.nl> ??????:43673fdc$1@newsgroups.borland.com... > I am writing a service application that communicates with an application > on a PDA. The PDA is ofcourse the client and the service is the > server.In the service I use WSAEventSelect to get events when the > connection is closed or data is available. > > When the app on the PDA closes the connection the server gets the close > event. However when the PDA is reset the server never gets the close > event. Are there other ways to detect the connection has been lost? > > Eelke Hi Eelke, Usually, you can send a heart-beaten msg between service and PDA in a short period. if the service timeout to receive the msg, the service can assume the connection is broken(PDA is reset). Certainly, this increases the complexity of the program. Good luck, chenzero
Technical Details
Message-ID:
<436d6a26@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeeder.wxs.nl!zen.net.uk!dedekind.zen.co.uk!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43673fdc$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,20f28b7bff8e46e5 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "chenzero" <somewhere@earth.solar.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <43673fdc$1@newsgroups.borland.com> Subject: Re: Detecting lost connections Date: Sun, 6 Nov 2005 10:28:12 +0800 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 218.19.201.158 Message-ID: <436d6a26@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1131244070 218.19.201.158 (5 Nov 2005 18:27:50 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeeder.wxs.nl!zen.net.uk!dedekind.zen.co.uk!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail