检测死的COM客户端 [英] Detect a dead COM client

查看:70
本文介绍了检测死的COM客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想知道进程外COM服务器是否有机会找出其客户端是否还存在或死亡,并正确终止与所有已终止客户端的连接.我将MS VC ++与MFC和ATL一起使用.有什么想法吗?

谢谢,汉斯

Hi,

I am wondering whether an out-of-process COM server has a chance to find out whether its clients are alive or dead, and to properly terminate the connection to any clients that have died. I am using MS VC++ with MFC and ATL. Any ideas?

Thanks, Hans

推荐答案

据我所知,与客户端进行任何通信的唯一方法是客户端是否提供了指向服务器的回调链接.但是,即使那样,如果没有一些预定义的协议,也很难确定客户端的状态.
As far as I am aware the only way to have any communication with the client, is if the client provides a callback link to the server. However, even then it would be difficult to determine the state of the client without some predefined protocol.


这比C ++/COM问题更普遍.
在OPC服务器-客户端通信(与许多通信一样)中,这是COM服务器-客户端的一种连接,您在服务器上创建了一个变量,该变量由客户端定期(通常可以假设)进行更新.有时称为保持活动"信号或类似信号.
This is more general than C++/COM question.
In OPC server-client communication (as in many kinds of communications) which is a kind of COM server-client connection you create a variable on server which is periodically (often as you can suppose) updated by the client. This is sometimes called "keep alive" signal or similar.


这篇关于检测死的COM客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆