一个out

编程入门 行业动态 更新时间:2024-10-28 21:22:41
一个out-proc COM服务器如何检测客户端故障?(How can an out-proc COM server detect client failure?)

假设我们有一个out-proc COM服务器和一个客户端。 客户端在服务器中调用方法并意外终止。 有没有办法让服务器检测到这种情况并中断该方法?

Say we have an out-proc COM server and a client. The client calls a method in the server and unexpectedly terminates. Is there a way for the server to detect this and interrupt the method?

最满意答案

不是没有保持活力。 如果您使用DCOM,则有内置的保持活动机制。 DCOM服务器将周期性地ping到COM客户端,如果3 ping无法应答,服务器将声明客户端“不在”并且服务器端对象可以消失。

如果它不是DCOM那么......?

Not without a keep-alive. There is a built-in keep-alive mechanism if you are using DCOM. The DCOM server will pingback to the COM client periodically, and if 3 pings go unanswered, the server declares the client "gone" and the server-side object can go away.

If it is not DCOM then...?

更多推荐

本文发布于:2023-07-29 18:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1318701.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!