简体   繁体   English

如何配置WCF将实时数据推送到客户端?

[英]How to configure WCF to push real-time data to the client?

I need to send live updates from server to client. 我需要从服务器向客户端发送实时更新。 I know that WCF generally can do this. 我知道WCF通常可以做到这一点。 However silverlight is a picky client.. 然而,silverlight是一个挑剔的客户..

Does anyone know how to configure WCF to send the real-time updates to Silverlight client? 有谁知道如何配置WCF以将实时更新发送到Silverlight客户端?

Snipets from configs and walkthrough will be greatly appreciated. 来自配置和演练的Snipets将不胜感激。

Use WCF Callbacks. 使用WCF回调。 A good walkthrough that shows several configurations for this is available on the MSDN . MSDN上提供了一个很好的演练,其中显示了几种配置。 We used the NetTCPBinding at my last job to great effect. 我在上一份工作中使用了NetTCPBinding,效果很好。 It's very fast and efficient. 它非常快速有效。 The downside is that it doesn't support secure transport on Silverlight, so if that's a requirement you'll need to go with the PollingDuplexHttpBinding. 缺点是它不支持Silverlight上的安全传输,所以如果这是一个要求,你需要使用PollingDuplexHttpBinding。

根据基础设施(内联网?),您可以使用套接字

You can setup your WCF service to use PollingDuplexHttpBinding . 您可以设置WCF服务以使用PollingDuplexHttpBinding

See this video tutorial from channel9. 从channel9查看此视频教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM