如何检查WCF中的注册客户端是否仍然存在 [英] How do I check if a registered client in WCF is still alive
本文介绍了如何检查WCF中的注册客户端是否仍然存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个WCF服务,我的应用程序的客户端可以登录并注册到服务。我保留了所有连接客户的列表。但是,如果客户在没有告知服务的情况下意外断开连接怎么办?如何自动删除它?
我试图使用一个计时器,它将与所有客户一起询问他们是否还活着,但我无法弄明白做一个好方法来做这一切。
请帮帮忙!
I have this WCF service where clients of my application can login and register to the Service. I keep a list of all connected clients. But what if a Client is accidently disconnected without telling de service? How can I remove it automatically??
I tried to use a timer which would poll with all clients asking if they are alive but I can't figure it out how to make a good method to do all this.
Please Help!
推荐答案
我想说创造一种关注服务是否正常的方法。
参见, http://geekswithblogs.net/LeonidGaneline/archive/2008/05/07/wcf-availability-of-the-wcf-services.aspx [ ^ 一>]
http://social.msdn.microsoft.com/Forums/vstudio/en-US/c939704d-97a8-4c01-88bb-02 96869c6e30 / checking-wcf-service-is-up-or-not?forum = wcf [ ^ ]
-KR
I would say create a method that takes care whether the service is up or not.
See, http://geekswithblogs.net/LeonidGaneline/archive/2008/05/07/wcf-availability-of-the-wcf-services.aspx[^]
http://social.msdn.microsoft.com/Forums/vstudio/en-US/c939704d-97a8-4c01-88bb-0296869c6e30/checking-wcf-service-is-up-or-not?forum=wcf[^]
-KR
这篇关于如何检查WCF中的注册客户端是否仍然存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文