Article View: borland.public.cppbuilder.internet.socket
Article #5769Re: Changing a Binding port in the TIdTCPServer
From: McKool
Date: Wed, 23 Jun 2004 06:03
Date: Wed, 23 Jun 2004 06:03
45 lines
2296 bytes
2296 bytes
THANKS! "dsiders" <mudshark@rancidbud.org> schrieb im Newsbeitrag news:40d8600b$1@newsgroups.borland.com... "McKool" <kenethw@peak-system.com> wrote in message news:40d83978@newsgroups.borland.com... > I want to give (if it is possible) to the user the possibility to stop the > server, change the port and start it again. I made it with MyServer->Active > = false but the Server do not take the new port number. > Is there a way to do that? I think your problem occurs because Bindings have already been created for listener thread(s) when Active was set to True. Setting the DefaultPort property does not change anything already allocated in Bindings. Options: * For multiple Bindings, set the port number directly in each of the existing Bindings. TIdTCPServer->Bindings[i]->Port = myIntPort; * To use a single default Binding, just clear the existing Bindings and set DefaultPort. TIdTCPServer->Bindings->Clear(); TIdTCPServer->DefaultPort = myIntPort; Either of these options has to be done when Active is False. > Where can I post a message to learn how to make a program in > C++ Builder that work like a services in Windows NT ? I don't have C++ Builder installed at the moment, but the Delphi VCL reference has docs for TServiceApplication and TService. C++Builder should also. Not sure which NG would be best... hth...
Technical Details
Message-ID:
<40d938b8$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:
<40d83978@newsgroups.borland.com> <40d8600b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11508e,2cf01be21fbab370 X-Google-Attributes: gid11508e,public From: "McKool" <kenethw@peak-system.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <40d83978@newsgroups.borland.com> <40d8600b$1@newsgroups.borland.com> Subject: Re: Changing a Binding port in the TIdTCPServer Date: Wed, 23 Jun 2004 08:03:40 +0200 Lines: 48 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: 213.157.13.214 Message-ID: <40d938b8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087977656 213.157.13.214 (23 Jun 2004 01:00:56 -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