GPRS提高数据接收速度 [英] GPRS Increase data receiving speed

查看:76
本文介绍了GPRS提高数据接收速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码已在运行.没有任何错误.

实际上,我们在字段中有多个设备.
每个设备都有自己的GPRS调制解调器.
使用此调制解调器通过GPRS网络向所有设备发送数据.
在PC端,一个应用程序(上面已经写了一些代码)使用UDP协议从GPRS服务器获取数据.

我的问题是,一次发送超过5个设备的数据时,通过GPRS服务器发送数据的时间与丢失和丢弃许多数据的时间没有区别.

PC端应用程序无法接收所有设备数据.
您能建议我如何处理一次发送的所有数据吗?

Following code is already running. No any errors.

Actually, we have multiple devices in fields.
Each device has own GPRS Modem.
All devices are sent data over GPRS network using this modem.
In PC side one application (above written some code) using UDP protocol to get the data from GPRS server.

My question is that when more than 5 devices are sent data at a time no difference in time to send data over GPRS server than many data are lost and discarded.

PC side application can not receive all device data.
Can you suggest me what can I do for receiving all data which are sent at a time?

Private sub ReceiveServer()
  While 1=1
    try
       '--- Receiving Method
       If client.Client.Available > 0 Then
	  mintGPRSPort = CInt(RemoteIpEndPoint.Port.ToString)
          ReDim bytes(0)
	  bytes = client.Receive(RemoteIpEndPoint)
	  clientdata = ""
       	  clientdata = Encoding.ASCII.GetString(bytes).Trim
          debug.print(clientdata)
       end if
   Catch ex As Exception
      Call LogError("ControlInterface.clsGPRS", "DataRequest", Err.Number, ex.Message, ex.StackTrace)
    End Try
  end while
end sub



谢谢...



Thanks...

推荐答案

切换到TCP,以便您进行可靠的传输.
Switch to TCP so you have a reliable transport.


我认为您没有使用异步UDP.插座.,

使用异步UDP套接字来避免数据丢失

使用异步UDP套接字的聊天应用程序 [
I think u are not using Asynchronous UDP sockets.,

use the Asynchronous UDP sockets to avoid the data loss

A Chat Application Using Asynchronous UDP sockets[^]

go through the above link for Asynchronous UDP sockets.


-------------------------

why are u going for udp , use the TCP communication which is more reliable. my suggestion is use the TCP communication for GPRS communications.

Thanks.


您可以尝试udx(tcp-over-udp)

www.goodudx.com
you can try udx(tcp-over-udp)

www.goodudx.com


这篇关于GPRS提高数据接收速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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