.NET 紧凑框架中的 WCF 托管
我想在 WinCE 设备上托管一个服务。 WinCE设备是可以由多个客户端(PC或WinCE)通过串行端口、TCP、USB等访问(控制和数据采集)的主机。我正在考虑使用协议缓冲区进行在线串行化。使用 WCF 或远程处理是理想的选择,但据我所知,它们并未在 Compact Framework 上实现。任何人都知道如何实现这一目标。
I would like to host a service on a WinCE device. The WinCE device is the host which can be accessed(control and data acquisition) by multiple clients (PC or WinCE) over serial port, TCP, USB etc. I was considering using Protocol Buffers for serialization on the wire. It would be ideal to use WCF or remoting but as far as I see they are not implement on the Compact Framework. Anyone have any ideas how this can be achieved.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CF 3.5 具有一些 WCF,但目前只有 full-fat 框架具有 WCF 以及支持动态交换序列化器的钩子。我知道有些用户使用 CF,但通过网络传递
Stream
(就 WCF 而言)并在 WCF 之外处理 protobuf-net(反)序列化(一个byte []
可能工作方式类似,但他们选择了Stream
- 我不记得为什么 - 也许是 base-64 问题?)。那会有帮助吗?CF 3.5 has some WCF, but at current only the full-fat framework has WCF with the hooks to support swapping out the serializer on the fly. I know of some users who are using CF but passing a
Stream
over the wire (as far as WCF is concerned) and handling the protobuf-net (de)serialization outside of WCF (abyte[]
may work similarly, but they choseStream
- I can't recall why- perhaps base-64 issues?). Would that help?我承认,这是一个明目张胆的插件,但您可能会考虑 托管 REST Web来自设备的服务。
It's a blatant plug, I admit, but you might consider hosting a REST web service from the device.