🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1926

Re: Bug? TIdTCPServer does not change Defaultport at runtime

#1926
From: RobertL
Date: Wed, 13 Sep 2006 19:02
39 lines
2473 bytes
Thank you for your quick help Gambit,

in the meantime I found the way to clear the binding according to your tip:
...
void __fastcall TForm1::Edit1DblClick(TObject *Sender)
{
 IdTCPServer1->Active=false;
 IdTCPServer1->Bindings->Clear();
 IdTCPServer1->DefaultPort=StrToInt(Edit1->Text);
 IdTCPServer1->Active=true;
 ListBox1->Items->Add( "Port: " + IntToStr(IdTCPServer1->DefaultPort) );
}
...

Regards Robert

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im Newsbeitrag 
news:450836b4$1@newsgroups.borland.com...
>
> "RobertL" <nospam@nospam.com> wrote in message
> news:4508012b$1@newsgroups.borland.com...
>
>> with this code I try to change the defaultport property and it
>> shows the desired port in the listbox, but allways the port set
>> at designtime is active, there is no change to the new value.
>
> Do you have any items already created in the Bindings collection when you
> make the change?  Changing the DefaultPort has no effect on existing items
> in the Bindings collection, only on new items that are added to the
> collection afterwards.  Each Binding has its own Port property that it
> listens on.  That value is initialized by the DefaultPort only when the
> Binding is first created.  Changing the DefaultPort does not update the 
> Port
> of existing Bindings.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <ee9ke6$kvj$1@online.de>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
References: <4508012b$1@newsgroups.borland.com> <450836b4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2bfb95212ddcbc6d
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
From: "RobertL" <rjl@home.de>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: Bug? TIdTCPServer does not change Defaultport at runtime
Date: Wed, 13 Sep 2006 21:02:24 +0200
Organization: 1&1 Internet AG
Lines: 41
Message-ID: <ee9ke6$kvj$1@online.de>
References: <4508012b$1@newsgroups.borland.com> <450836b4$1@newsgroups.borland.com>
NNTP-Posting-Host: pd957a2fb.dip0.t-ipconnect.de
X-Trace: online.de 1158173959 21491 217.87.162.251 (13 Sep 2006 18:59:19 GMT)
X-Complaints-To: abuse@einsundeins.com
NNTP-Posting-Date: Wed, 13 Sep 2006 18:59:19 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original