iPad + WCF 双工 +原始缓冲区
我即将开始为现有的 WCF 服务构建一个 iPad 客户端,该服务当前通过 Duplex 通道回调进行通信,并定期将轻量级数据传输对象推送到客户端。我计划使用单点触摸来做到这一点。
我知道iOS平台支持点对点通信,所以我希望在设备发起第一次连接后,我可以启动从服务到设备的双工通信通道。
这种方法适用于 iPad 吗?
目前,我正在使用 protobuf-net 将我的有效负载压缩成一个漂亮的紧凑字节[],并且客户端相应地对其进行反序列化。我可以继续这样做吗?
或者我应该公开该服务的第二个接口,并使用 XML 响应对象实现新的轮询模型,以补充现有客户端应用程序的推送模型?
任何关于更好的方法来解决这个问题的建议都值得赞赏。
I'm about to start building an iPad client for an existing WCF service that currently communicates via Duplex channel callbacks and pushes lightweight data transfer objects to the client at regular intervals. I'm planning to do this using monotouch.
I know that the iOS platform supports peer-to-peer communication, so my hope is that I can initiate a duplex communication channel from the service to the device after the device has initiated the first connection.
Will this approach work on an iPad?
Currently I'm using protobuf-net to squish my payload into a nice tight byte[] and the client deserializes it accordingly. Can I continue to do so?
Or should I expose a second interface with the service and implement a new polling model with XML response objects to compliment the push model for my existing client apps?
Any advice on a better way to approach this is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法评论双工,但关于 protobuf-net - 是的,尤其是在 v2 中; zip 中有一个 iOS 版本,我知道在单点触控和 Unity 中使用它的成功案例。
I can't comment on the duplex, but re protobuf-net - yes, especially in v2; there is an iOS build in the zip, and I know of success stories using this with both monotouch and unity.