从我的WCF应用程序向客户端应用程序发送一些消息 [英] Send some messages to client application from my WCF application

查看:102
本文介绍了从我的WCF应用程序向客户端应用程序发送一些消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发WCF服务。一旦客户提出请求,我的服务必须发送一些消息,如任务1完成,任务2完成反之亦然......最后需要发送响应。



Up到现在为止我完全回应了客户。但我希望在客户等待最终回复的同时向客户提供处理信息。



使用的技术:



客户:DOTNET应用程序V3.5

服务器:DOTNET WCF服务。

绑定:流式请求绑定。



如果我无法解释清楚,我很抱歉。请帮我解决这个问题。

解决方案

实际上你必须从服务器向客户端发送事件。通过WCF,Microsoft可以将这种服务称为双工服务。使用该搜索词,您可以在网上找到更详细的帮助。


这些可能对您有所帮助

使用双工WCF服务广播事件 [ ^ ]



具有双面合同的访问服务 [ ^ ]

I am developing WCF Service. Once the client gives request, my service has to send some messages like Task 1 completed, Task 2 completed vise versa... and finally need to send response.

Up to now I am giving response to client perfectly. But I want to give processing information to the client while the client waiting for final response.

Technology used:

Client : DOTNET Application V3.5
Server : DOTNET WCF Services.
Bindings : Streamed request binding.

I am sorry if I was not able to explain clearly. Please help me regarding this.

解决方案

Actually you have to send events from the server to the client. It is possible with WCF, Microsoft uses to call such a service a "duplex service". With that search term, you'll find some more detailed help on the web.


These might help you
Broadcasting Events with a Duplex WCF Service[^]

Access Services with a Duplex Contract[^]


这篇关于从我的WCF应用程序向客户端应用程序发送一些消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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