问题描述
以下代码已在运行.没有任何错误.
实际上,我们在字段中有多个设备.
每个设备都有自己的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...
推荐答案
这篇关于GPRS提高数据接收速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!