Connections & Close Exceptions

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Connections & Close Exceptions

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:34 pm

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.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Connections & Close Exceptions

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:34 pm

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


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 29 guests

cron