Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Aug : indy socket 9 - no exception when one is expected
| Subject: | indy socket 9 - no exception when one is expected |
| Posted by: | user@domain.invalid |
| Date: | Wed, 29 Aug 2007 14:54:46 |
I am communicating between two apps via indy sockets v.9 from BDS 2006.
In the client, I issue a read to the socket which blocks until I
provide data. When the read returns, I process the data and read again.
I thought I would receive and exception when the socket is no longer
connected but that does not seem to always be the case.
I do get an exception (as expected) if the server calls disconnect on
the socket. However, I have seen a scenario where the server detects
the socket is no longer connected (but did not call disconnect) and
therefore can not send a disconnect message. In this case, the client
does not except and remains blocked in the read.
Is this behavior what I should expect for the given scenario? If so,
how should the client detect the socket is no longer connected?
Thanks,
_Eric