Article View: borland.public.cppbuilder.internet.socket
Article #4832Detecting a client disconnect
From: Paul Machiaverna
Date: Tue, 23 Nov 2004 19:48
Date: Tue, 23 Nov 2004 19:48
4 lines
1313 bytes
1313 bytes
I'm using INDY 9 components for a TCP server application. Is there a way to detect when a client disconnects? Each of the way to test for disconnect that I've found only work after both the client and the server have disconnected. Using netstat, the connection state is in CLOSE_WAIT when the client disconnects and until the server also disconnects. Is there a way to programatically check for this CLOSE_WAIT state? Thanks, Paul Mac
Technical Details
Message-ID:
<41a3a222$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!prodigy.com!newshosting.com!nx02.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2bbc0c2eefeb0788,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Paul Machiaverna" <paul.machiaverna@i-stat.com> Sender: "Paul Machiaverna" <paul.machiaverna@i-stat.com> Reply-To: "Paul Machiaverna" <paul.machiaverna@i-stat.com> Subject: Detecting a client disconnect Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 130.36.11.141 NNTP-Posting-Host: 207.105.83.66 Message-ID: <41a3a222$1@newsgroups.borland.com> Date: 23 Nov 2004 12:48:34 -0700 X-Trace: newsgroups.borland.com 1101242914 207.105.83.66 (23 Nov 2004 12:48:34 -0700) Lines: 4 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!prodigy.com!newshosting.com!nx02.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail