其他客户端是否可以使用 WCF 轮询双工服务?

发布于 2024-07-26 23:34:36 字数 222 浏览 8 评论 0原文

我正在使用 silverlight 客户端编写一个服务器应用程序。 在某些时候,我希望非 silverlight 客户端能够使用我的服务。 现在我已经编写了一些进行轮询的 WCF 服务,但我对响应能力不满意。 我正在考虑将代码切换为使用 Silverlight/WCF 双工轮询,但如果我这样做,我是否会一直将 Silverlight 作为我唯一的客户端? 使用普通的 WCF http 服务编写自己的长轮询服务是否更好?

I'm writing a server app with a silverlight client. At some point I'd like non-silverlight clients to be able to use my services. Right now I've written some WCF services which get polled, but I'm not happy with the responsiveness. I'm thinking of switching the code over to using Silverlight/WCF duplex polling, but if I do that, will I be stuck with Silverlight as my only client? Is it better to write my own long-polling service using normal WCF http services?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

徒留西风 2024-08-02 23:34:36

我在那里没有看到你的问题。 您可以定义另一个绑定供其他客户端使用(例如 WsHttpDualBinding)。 无论底层绑定如何,相同的服务器代码都将执行完全相同的任务。 这就是使用 WCF 的全部意义。

I don't see your issue there. You can just define another binding for use by other clients (like WsHttpDualBinding). The same server code will perform the exact same task regardless of the underlying binding. That's the whole point of using WCF.

铜锣湾横着走 2024-08-02 23:34:36

您可以在此处找到使用 WCF 双工服务的 AJAX 示例 http://tomasz.janczuk.org/2009/09/scale-out-of-silverlight-http-polling.html

You can find a AJAX sample here for using a WCF duplex service http://tomasz.janczuk.org/2009/09/scale-out-of-silverlight-http-polling.html

山色无中 2024-08-02 23:34:36

通过其他 .NET 客户端 - 是的。 别的什么:不。 WsHttpDual 绝对不是一个可互操作的协议。 它还有很多其他缺点和陷阱,我会尽量远离它……

Marc

By other .NET client - yes. By anything else : no. WsHttpDual is definitely NOT an interoperable protocol. It also has plenty of other drawbacks and pitfalls and I'd try to stay away from it as much as possible......

Marc

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文