same problem
"Does your app make the assumption that a full message always arrives as a single read?"
Hello agraham!
Thanks for answer. But I know, that even can arrive small messages. In my application, the GPSStream collects the parts of the NMEA, so that I have every 4 seconds a new protocol, when the server sends every 2 seconds. That operates very fine (the image is only 15x15 pixels, so I think, it doesn’t matter):
Sub Timer2_Tick
ErrorLabel(connectionbreak)
If ComboBox2.SelectedIndex = 1 Then
If client.DataAvailable=true Then
Image4.LoadPicture("IconDaten1.bmp")
GPS_Server.GPSStream(filestream.ReadString)
Else
Image4.LoadPicture("IconDaten2.bmp")
End If
Else If client.DataAvailable Then
fileStream.ReadString
End If
Return
connectionbreak:
..
client.close
End Sub
When the timer is bigger than 500, I will take in backlog. So I only can get older data. I can see that, when I take a look at the UTC-Time. The different between the UTC-Time from the protocol which the server sends and the UTC-Time in the GPS_Server_GPSDecoded-sub runs up.
The connectionbreak is only called, when the GPRS-connection breaks down.
When the timer2 is 1000 and smaller and the server sends no data, the app stops, before there is a reaction on client.dataAvailable<>true.
:sign0148::sign0148:
"Does your app make the assumption that a full message always arrives as a single read?"
Hello agraham!
Thanks for answer. But I know, that even can arrive small messages. In my application, the GPSStream collects the parts of the NMEA, so that I have every 4 seconds a new protocol, when the server sends every 2 seconds. That operates very fine (the image is only 15x15 pixels, so I think, it doesn’t matter):
Sub Timer2_Tick
ErrorLabel(connectionbreak)
If ComboBox2.SelectedIndex = 1 Then
If client.DataAvailable=true Then
Image4.LoadPicture("IconDaten1.bmp")
GPS_Server.GPSStream(filestream.ReadString)
Else
Image4.LoadPicture("IconDaten2.bmp")
End If
Else If client.DataAvailable Then
fileStream.ReadString
End If
Return
connectionbreak:
..
client.close
End Sub
When the timer is bigger than 500, I will take in backlog. So I only can get older data. I can see that, when I take a look at the UTC-Time. The different between the UTC-Time from the protocol which the server sends and the UTC-Time in the GPS_Server_GPSDecoded-sub runs up.
The connectionbreak is only called, when the GPRS-connection breaks down.
When the timer2 is 1000 and smaller and the server sends no data, the app stops, before there is a reaction on client.dataAvailable<>true.
:sign0148::sign0148: