Blaze

Back Again

 

webservice对"小"规模数据传输的效率问题

目前正准备弄一个免费的智能设备网络棋牌项目,对于和服务器的通信犯了难。一开始想用webservice,担心流量问题。(毕竟1K三分钱) 做了一个测试,调用http://www.KamalPatel.net上代码转换的WebService,拦截到以下数据包:
下面是数据包中的Http头:
HTTP/1.1 200 OK..Date: Sun, 24 Oct 2004 01:04:14 GMT..Server: Microsoft-IIS/6.0..Set-Cookie: server=1..X-Powered-By: ASP.NET..X-AspNet-Version: 1.1.4322..Cache-Control: private, max-age=0..Content-Type: text/xml; charset=utf-8..Content-Length: 600...
这些已经很多了,看下面才让人寒~
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ExecuteResponse xmlns="http://tempuri.org/"><ExecuteResult>.'----------------------------------------------------------------..' Converted from C# to VB .NET using CSharpToVBConverter(1.2)' Developed by: Kamal Patel (http://www.KamalPatel.net) ..'----------------------------------------------------------------..</ExecuteResult></ExecuteResponse></soap:Body></soap:Envelope>
需要的内容只是这些<ExecuteResult>.'----------------------------------------------------------------..' Converted from C# to VB .NET using CSharpToVBConverter(1.2)' Developed by: Kamal Patel (http://www.KamalPatel.net) ..'----------------------------------------------------------------..</ExecuteResult></ExecuteResponse>
总字节数851,可除去那些格式占的,我们所需的只有291字节,确实很恐怖。这样算下来一部棋要2分钱。可能不太现实。
想到自己来控制tcp连接,担心移动网关是否会限制住。手头也没有smartphone,无条件调试,希望大家能够帮忙。

posted on 2004-10-24 09:18  Blaze  阅读(2345)  评论(4编辑  收藏  举报

导航