|
-
April 6th, 2008, 11:20 AM
#1
SocketServer getting delay to listen client when if restart the server PC
Hi,
I have followed the article Asynchronous Socket Programming in C#: Part II
(link: http://www.codeguru.com/csharp/cshar...cle.php/c8781/)
I need to place the SocketServer application in a PC startup menu. So that once the SocketServer application is started after restarting the PC, the client machine can connect to server and communicate.
But I have a Client connection problem when SocketServer application luanches immediately after restarting the SocketServer application PC.
I mean when I press "Connect to Server" Button from the Client application Immediately after the SocketServer application launches after restarting that PC, The client is not connecting to server application immediately.
I need to wait at least 15 to 20 second to get the connection from Client PC to Server. But after that it works fine.
Only I face delay first time if I am trying to connect from client machine to server, When Server machine restarting.
How can I avoid this delay please help on this.
-
April 6th, 2008, 05:36 PM
#2
Re: SocketServer getting delay to listen client when if restart the server PC
One can only guess what the problem is. Maybe the network connection isn't properly up and running, thus the server cannot be reached.
- petter
-
April 7th, 2008, 02:08 AM
#3
Re: SocketServer getting delay to listen client when if restart the server PC
You may need to wait until some dependent Windows services startup.
I would put your source code into a Windows Service and specify those dependent services and the Service Controll Manager will start your service in the proper order.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|