Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages
Started by McKool
Tue, 22 Jun 2004 13:52
Changing a Binding port in the TIdTCPServer
Author: McKool
Date: Tue, 22 Jun 2004 13:52
Date: Tue, 22 Jun 2004 13:52
13 lines
1393 bytes
1393 bytes
Hello. I look many examples of servers with the TIdTCPServer Component version 9 and always is not allowed to make a "disconnect" in the Server. 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? Other question: 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 want to make my server run in that way Thanks in advance.
Re: Changing a Binding port in the TIdTCPServer
Author: dsiders
Date: Tue, 22 Jun 2004 16:36
Date: Tue, 22 Jun 2004 16:36
43 lines
2303 bytes
2303 bytes
"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...
Re: Changing a Binding port in the TIdTCPServer
Author: 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...
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads