BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Specifying sock by a refence in the Services. File

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Graham Harris
Guest





PostPosted: Thu Jan 15, 2004 10:05 am    Post subject: Specifying sock by a refence in the Services. File Reply with 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.

I am using Indy 9.0.

TIA

Graham Harris


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Jan 15, 2004 7:03 pm    Post subject: Re: Specifying sock by a refence in the Services. File Reply with quote




"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.