Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Apr : Client connection problem
| Subject: | Client connection problem |
| Posted by: | pawnflak..@gmail.com |
| Date: | 23 Apr 2007 12:57:21 |
Hi friends!
I am new to using the indy components.
My problem is:
I'm writing a client/server application. The client is a service
application.
What I would like to achieve is the following:
If the server is not available, the client should keep on trying
(every 5 seconds) to connect to the server until the server is
available. Could someone please help me to solve this problem as I
have wasted hours on how to address this problem?
The client code looks like this:
try
TCPClient.Host := DefaultServerIP;
TCPClient.Port := DefaultServerPort;
TCPClient.Connect;
except on E: Exception do
MessageDlg ('Error while connecting to SERVER:'+#13+E.Message,
mtError, [mbOk], 0);
Thanks