的Andr​​oid / iOS版客户端消耗WCF双工服务 [英] Android/iOS client consumes WCF Duplex service

查看:197
本文介绍了的Andr​​oid / iOS版客户端消耗WCF双工服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个服务器/网络服务,它提供的API到Android / iOS版客户端。我使用WCF服务和客户端可以成功发送请求给服务器。现在,我打算让服务器能ping通客户端通知,有服务器和客户端的一些改变需要同步数据。

I am trying to build a server/web service which provides APIs to Android/iOS client. I am using WCF service and clients can send request to server successfully. Now, I am going to make server enable to ping client to notify that there some changes in server and client need to synchronize data.

现在的问题是:是否有可能使我的服务器到客户端平(的Andr​​oid / iOS版),我就知道它有可能为Windows客户端通过使用wsDualHttpBinding但我不知道iOS和Android客户端。任何人都可以帮我说清楚?任何解决方案是AP preciated。

The question is: Is it possible to enable my server to ping client (Android/iOS), I knew that it is possible for Windows client by using wsDualHttpBinding but I am not sure about iOS and Android client. Anyone can help me to make it clear? Any solution is appreciated.

推荐答案

我不认为你可以做到这一点。为启动,而wsDualHttpBinding旨在是可互操作的,我不实际上beleive它是由比WCF任何otehr框架支撑。然后wsDualHttpBinding使用<一个href=\"http://msdn.microsoft.com/en-us/library/system.servicemodel.wsdualhttpbinding.clientbaseaddress.aspx\"相对=nofollow>客户端回调网址服务器需要联系。此网址无法将是一个手机上访问。你应该使用WebSockets,长轮询或设备操作系统的一些专有推送机制。

I don't think you can do it. For start, while wsDualHttpBinding is intended to be interoperable I don't beleive in practice it is supported by any otehr framework than WCF. Then wsDualHttpBinding uses a client callback url that the server needs to contact. This url is not going to be accessible on a phone. You should use websockets, long polling or some proprietary push mechanism of the device os.

这篇关于的Andr​​oid / iOS版客户端消耗WCF双工服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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