Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Re: how to check connection?

www.cryer.info
Managed Newsgroup Archive

Re: how to check connection?

Subject:Re: how to check connection?
Posted by:"Craig" (firebirdwebg..@hotmail.com)
Date:Sat, 29 Dec 2007 21:51:45

> Pulling a cable at the PC end MAY allow the NIC/OS to detect it and
> invalidate any active sockets immediately.  But that is not a guarantee.
> I've seen cases where doing that can freak out the OS and completely lock
it
> up.
>
> Pulling the cable out at the router/modem end will not allow the PC to
> detect it at all, unless there is a low-level heartbeat between the NIC
and
> router/modem that times out quickly.
>

The issue is, are we connected to a peer? The ONLY way you can know if the
socket is still valid is to test by sending data.. Period. True, you NIC
might be able to detect that YOUR cable is disconnected, I say MIGHT, but
the other side will have no idea that such a catastrophe took place, until
it trys to send etc.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive