Article View: borland.public.cppbuilder.internet.socket
Article #5050Re: TCP Timeout
From: Drew
Date: Tue, 26 Oct 2004 21:03
Date: Tue, 26 Oct 2004 21:03
42 lines
2303 bytes
2303 bytes
Thanks very much for this, as always. "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:417eb3d1$1@newsgroups.borland.com... > > "Drew" <aemsley@brightwell.org.uk> wrote in message > news:417eaff4@newsgroups.borland.com... > > > If the client does not disconnect cleanly, the TCP connection > > remains established and does not appear to timeout. > > Yes, it will time out eventually. It may take a long time, simply because > the underlying socket stack itself (WinSock on Windows) can't detect > abnormal disconnects in any timely fashion, but it will eventually time out > internally and decide the socket is no longer valid. > > > When the number of connections reaches the maximum allowed by the > > TIdTCPServer (48), it quite rightly rejects all other attempts to > reconnect. > > Correct. > > > 1. What controls the TCP timeout period? > > The socket stack itself and its internal configurations. > > > 2. What is the best way of the TCP Server detecting failed > > connections in this way? > > Implement your own pinging type of system in your communications. Have your > clients send a small packet to the server periodically (if not sending > actual data for awhile) so that the server knows the connection is still > alive. If you do not receive any data after so much time, simply assume the > client is gone and close the connection yourself. > > > Gambit > >
Technical Details
Message-ID:
<417ebb58$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<417eaff4@newsgroups.borland.com> <417eb3d1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e7285fc7a0e415b7 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Drew" <aemsley@brightwell.org.uk> Newsgroups: borland.public.cppbuilder.internet.socket References: <417eaff4@newsgroups.borland.com> <417eb3d1$1@newsgroups.borland.com> Subject: Re: TCP Timeout Date: Tue, 26 Oct 2004 22:03:04 +0100 Lines: 44 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: 81.137.221.84 Message-ID: <417ebb58$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1098824536 81.137.221.84 (26 Oct 2004 14:02:16 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail