如何使双向通信使用.NET通知 [英] Ways to make two way communications for notification using .NET

查看:145
本文介绍了如何使双向通信使用.NET通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台服务器/客户端项目,我使用C#进行编码,WCF的服务器。我仅限于HTTP,没有运气与wsdualhttpbinding至今。项目致力于公司的网络上。

I have a server/client project, I am using C# for coding, WCF as server. I am limited to HTTP, had no luck with wsdualhttpbinding so far. Project is working on company network.

有没有办法从服务器发送通知给客户以任何方式比WCF双工其他?请告诉所有选项。

Is there any way to send notifications from server to client in any way other than WCF duplex? Please tell all options.

推荐答案

我假设,因为你有问题,传入连接防火墙问题。

I am assuming because of firewall issues you have problems with an incoming connection.

在这种情况下,以解决该问题的常用方法是

In such a scenario a common way to solve the problem is.

  1. 有从中使用服务请求的 A 也许 GetNextNotification
  2. 轮询服务器一个单独的线程
  3. 在这方面应该有一个较高的超时时间。
  4. 在服务器端时的 A 的处理方法不会返回,直到有一些服务器想要传达的客户端
  5. A 返回客户端处理的通知,并让另一个 A 的要求。
  1. Have a separate thread from which you poll the server using the service request A maybe GetNextNotification
  2. This connection should have a high timeout.
  3. On the server side when A is processed the method doesn't return until there is something server wants to convey to the client
  4. Once A returns the client processes the notification and makes another A request.

这篇关于如何使双向通信使用.NET通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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