Page 1 of 1

Connections & Close Exceptions

Posted: Fri Aug 07, 2009 2:34 pm
by ConvertFromOldNGs
by Wilfred Verkley >> Wed, 13 Jun 2001 22:43:14 GMT

Is the only way to tell whether a NamedPipe (or other types of connection?) has been closed by other other side is to catch the appropriate exception in a global exception handler?

Im using asynch calls, so there is no way to surround it with a local exception handler and it seems there is no callback for a close initiated by the other side.

Thanks,

Wilfred.

Re: Connections & Close Exceptions

Posted: Fri Aug 07, 2009 2:34 pm
by ConvertFromOldNGs
by Richard Mitchell >> Fri, 15 Jun 2001 0:14:32 GMT

Wilfred

I think you're right. If the main thread has gone idle then any local exception handlers will have been disarmed. Certainly, for CardSchema's CnTcpConnection class I found I had to use a globally armed handler to catch exceptions. I don't know of any alternative to this.
--
Richard W Mitchell
JADE Systems Group, JADE Direct
mailto: rmitchell@jade.co.nz

JADE Group trading as a division of Aoraki Corporation Ltd.
Visit our web site at news.jadeworld.com