 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Graham Harris Guest
|
Posted: Thu Jan 15, 2004 10:05 am Post subject: Specifying sock by a refence in the Services. File |
|
|
I have a NT Service which recieves data on a port, the question is how do I
set the port by way of using the services file, as I want to avoid using the
registry.
I am using Indy 9.0.
TIA
Graham Harris
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Jan 15, 2004 7:03 pm Post subject: Re: Specifying sock by a refence in the Services. File |
|
|
"Graham Harris" <ng (AT) bmsgharr (DOT) globalnet.co.uk> wrote
| Quote: | I have a NT Service which recieves data on a port, the question
is how do I set the port by way of using the services file, as I
want to avoid using the registry.
|
You would have to read the service file manually, find your entry, parse out
the port number, and then assign it to your server's Port property before
then activating the server. Alternatively, you can simplify that a little
by making use of the TIdStack.WSGetServByName() method, ie:
IdTCPServer1.DefaultPort := GStack.WSGetServByName('myservice');
| Quote: | I am using Indy 9.0.
|
Indy servers do not natively support specifying ports by the Services file,
it only supports actual port numeric values by specified.
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|