在 WCF 中不使用 CallBack 将数据推送到客户端 [英] Push data to client without using CallBack in WCF

查看:18
本文介绍了在 WCF 中不使用 CallBack 将数据推送到客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不使用回调的情况下将数据推送到 WCF 服务中的客户端?

Is it possible to push data to client in WCF service without using callback?

场景:

有 2 个客户端消费服务.客户端 1 发送消息,然后客户端 2 收到客户端 1 发送的消息.

There are 2 client consuming service. Client 1 send message and then Client 2 get message send by Client 1.

推荐答案

有几种方法可以解决这个问题

There are several approaches to this problem

  1. 使用发布订阅框架

在 WCF 中使用双工服务

Using Duplexing service in WCF

也看看这篇文章,使用 WCF 回调服务向客户端推送数据http://www.dotnetcurry.com/ShowArticle.aspx?ID=721

这篇关于在 WCF 中不使用 CallBack 将数据推送到客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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