Article View: borland.public.cppbuilder.internet.socket
Article #5413Re: Close down connections from the server side. Indy.
From: Remy Lebeau (TeamB)
Date: Mon, 06 Sep 2004 21:33
Date: Mon, 06 Sep 2004 21:33
31 lines
1963 bytes
1963 bytes
"Ulrik Nilsson" <di2niul@chl.chalmers.se> wrote in message
news:413cc343$1@newsgroups.borland.com...
> while( ! AThread->Terminated && AThread->Connection->Connected() )
You should not be looping like that. The OnExecute event is already looped
for you. Get rid of the loop altogether.
> AThread->Connection->Disconnect();
Use DisconnectSocket() instead of Disconnect().
> AThread->Connection->CheckForDisconnect();
You don't need to call that. ReadLn() and WriteLn() will do that for you.
> You wrote "Use the actual constructor instead". How and where?
You do know what a constructor is in the first place, don't you? It is a
class method that has the same name as the class itself. In this case,
TForm1(), which is automatically generated for you by the IDE for VCL forms:
__fastcall TForm1::TForm1(TComponent *Owner)
: TForm(Owner)
{
// this is the constructor. Put your initialization code in here...
}
Gambit
Technical Details
Message-ID:
<413cd762@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:
<413cb130$1@newsgroups.borland.com> <413cbe74@newsgroups.borland.com> <413cc343$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,94b92865a961b40 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <413cb130$1@newsgroups.borland.com> <413cbe74@newsgroups.borland.com> <413cc343$1@newsgroups.borland.com> Subject: Re: Close down connections from the server side. Indy. Date: Mon, 6 Sep 2004 14:33:59 -0700 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <413cd762@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1094506338 68.69.17.41 (6 Sep 2004 14:32:18 -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