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 

Synchronize the start of a Service application

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Sam S. Firouz
Guest





PostPosted: Fri Apr 21, 2006 9:03 pm    Post subject: Synchronize the start of a Service application Reply with quote



Hi:
What is the best way to make sure my service application does
not start before the TCP/IP has started and the machine has a
valid IP address (The IP address is coming from DHCP server).

Thank you
Sam
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Apr 21, 2006 10:03 pm    Post subject: Re: Synchronize the start of a Service application Reply with quote



"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:44494386$1 (AT) newsgroups (DOT) borland.com...

Quote:
What is the best way to make sure my service application does
not start before the TCP/IP has started and the machine has a
valid IP address (The IP address is coming from DHCP server).

There isn't any. Your service will just have to periodically query the
current IP and ignore it if it is not valid.


Gambit
Back to top
Vladimir Stefanovic
Guest





PostPosted: Sat Apr 22, 2006 10:03 am    Post subject: Re: Synchronize the start of a Service application Reply with quote



Quote:
What is the best way to make sure my service application
does not start before the TCP/IP has started and the machine
has a valid IP address (The IP address is coming from DHCP
server).

Why you are bothering of such scenario? It's prety common
situation that server cannot respond, because it's not found
or something similar. In client/server architecture it's easy and
safe to catch the non-listening server event, and such case must
be designed on client side.




--
Best Regards,
Vladimir Stefanovic
Back to top
Sam S. Firouz
Guest





PostPosted: Mon Apr 24, 2006 10:03 pm    Post subject: Re: Synchronize the start of a Service application Reply with quote

Is there at lease any way to make my service dependant on DHCP service?

Thank You
Sam



"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:

Quote:
There isn't any. Your service will just have to periodically query the
current IP and ignore it if it is not valid.


Gambit

Back to top
Sam S. Firouz
Guest





PostPosted: Mon Apr 24, 2006 10:03 pm    Post subject: Re: Synchronize the start of a Service application Reply with quote

My service is the server and needs to access some file on the network drive.

Thank you
Sam



"Vladimir Stefanovic" <antivari (AT) po (DOT) sbb.co.yu> wrote:
Quote:

Why you are bothering of such scenario? It's prety common
situation that server cannot respond, because it's not found
or something similar. In client/server architecture it's easy and
safe to catch the non-listening server event, and such case must
be designed on client side.




--
Best Regards,
Vladimir Stefanovic

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Apr 24, 2006 11:03 pm    Post subject: Re: Synchronize the start of a Service application Reply with quote

"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:444d3e57$1 (AT) newsgroups (DOT) borland.com...

Quote:
Is there at lease any way to make my service dependant on DHCP service?

Sure, simply include the DHCP service in the TService's Dependancies
collection. Of course, that only ensures that the DHCP service is running,
but it does not ensure that an IP will be available right away. So you
still need to write your socket code to expect that condition regardless.


Gambit
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Apr 24, 2006 11:03 pm    Post subject: Re: Synchronize the start of a Service application Reply with quote

"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:444d3ea2$1 (AT) newsgroups (DOT) borland.com...

Quote:
My service is the server and needs to access some file on the network
drive.


You do know that services DO NOT have access to network resources by
default, right? Are you configuring your service to run with a user account
that has netowkr access? If not, then you need to do so.


Gambit
Back to top
Sam S. Firouz
Guest





PostPosted: Tue Apr 25, 2006 8:03 pm    Post subject: Re: Synchronize the start of a Service application Reply with quote

Yes, I had learned this the hard way few years back.
Thanks for the reminder anyway.

Thank you
Sam


"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:
Quote:

"Sam S. Firouz" <sfirouz (AT) comcast (DOT) net> wrote in message
news:444d3ea2$1 (AT) newsgroups (DOT) borland.com...

You do know that services DO NOT have access to network resources by
default, right? Are you configuring your service to run with a user account
that has netowkr access? If not, then you need to do so.


Gambit

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) 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.