Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Re: how to check connection?
| Subject: | Re: how to check connection? |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 28 Dec 2007 12:45:15 |
"soonic" <xxsoonic@op.pl> wrote in message
news:47755b65$1@newsgroups.borland.com...
> I use Indy components server and client. How to check
> the physical connection between two computers?
You can't. Not accurately, anyway, because the OS itself can't do that
reliably.
> I mean when I lose connection (i.e. the cable will unplug, network
> card stops working) then I want the server to inactive and take
> other actions.
You have to either use the ReadTimeout property for the connection, or
better is to implement your own keepalive commands in your communication
protocol if possible. Go to http://www.deja.com and search the newsgroup
archives. This has been discussed many times before.
Gambit