android wcf tcp通信,xamarin.android - WCF with Android (TCPBinding) and ServiceStack - Stack Overflow...

I'm investigation different options to access remote data for an Android application(in the future WindowsEmbedded and possibly iOS with monotouch), so I've made some tests and I'm trying to understand what is possible and is not possible to do.

I already have a client(WindowsCE)/server(win32) solution that uses raw sockets. I'll rewrite the server with .NET,and for communication I would like to try WCF.

I wrote a simple WCF .NET server application, and connected to it with basicHTTPBinding with Android, and it works.

But for performance reasons I want to use TCPBinding, and I got stuck with svcutil etc etc, and I can't understand if I'm unable to do it or if is not possible.

Is WCF fully, partially, going to be fully supported in mono for android?

If the answer is no, and I cannot use binary TCP binding with WCF, what would it be the advantage of moving to ServiceStack (havent't tested yet, but seems to be considered better than WCF).

Thanks!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
相关说明: ConsoleApplication1_sERVER ----PC-服务端 MyNetTest --------------------IOS-客户端 1、PC-服务端 只是一个运行在windows系统下的 控制台程序。接收来自客户端的信息。 2、IOS-客户端 运行在ios模拟器上,连接PC服务端的ip,发生相关信息。 3、两台主机,一台是运行windows系统的计算机。另外一台是MacBook计算机。运行ios模拟器。 4、pc-服务端,可以用vs2008打开并且编辑。 5、ios客户端,使用的是XamarinStudio 打开并且编辑。 以下是这个例子中的特别提到的地方 A、这个例子是完全用C#写的。 B、ios由于是伪后台,当程序退回到后台,系统留给程序的可运行时间就只有3分钟。 过了3分钟,就会把这个程序的所有线程挂起(当然内部预留了长任务运行这一后招)。 经过多次试验后,可以借助着3分钟的长任务运行,然后通过简单的修改来突破这个界限。 在本例子中,所有线程共享一个线程ID。 其中只需要一条线程负责不停的延长这个线程ID的运行时间,然后其他的线程就只需要专注于其本应该要做的任务即可。 C、本例子中,还实现了另外一个功能,就是ios程序与PC程序进行socket。当然是最为简单的。 ---------------- 由于本人也是刚刚使用c#开发ios程序,初入门,为了这两个问题,也是研究了很久,可查的资料又很少。 希望能够帮助到同样遇到困难的你。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值