如何使用 NetTcpBinding 通过 WCF 获得可靠的回调
我计划将 NetTcpBinding 用于需要保持大量客户端同步的应用程序。
每当服务器状态发生变化时,必须通知所有连接的客户端。
但是,如果出现网络问题,我需要客户端自动重新连接,来自服务器的给定客户端的任何未完成的回调不应丢失。 如果与服务器的连接丢失并且无法重新创建,我还需要通知客户端的 GUI 代码。 (或者如果服务器重新启动)
NetTcpBinding 是否与 WS-ReliableMessaging 给我这个“out 盒子”?
I am planning to use the NetTcpBinding for an application that needs to keep a hand-full of clients in sync.
Whenever there is a change of state at the server, all the connected clients must be informed.
However I need the clients to automatically reconnect if there is a network problem, any outstanding callbacks from the server for the given client should not get lost.
I also need to the client’s GUI code to be informed if the connection to the sever is lost and cannot be recreated. (or if the server restarts)
Does the NetTcpBinding with
WS-ReliableMessaging give me this “out
of the box”?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请在此处查看这篇文章:Windows Communication Foundation 的可靠消息传递简介 在标题为“可靠消息传递会话选项”的部分下。具体来说,MaxRetryCount 属性可能就是您正在寻找的。
Check out this article here: Introduction to Reliable Messaging with the Windows Communication Foundation under the section titled "Reliable Messaging Session Options". Specifically the MaxRetryCount property may be what you're looking for.