Sub Timer2_Tick
ErrorLabel(connectionbreak)
If ComboBox2.SelectedIndex = 1 Then
If client.DataAvailable=true Then
Image4.LoadPicture("IconDaten1.bmp")
'REMOVE THIS LINE:filestream.New1(client.GetStream,false)
GPS_Server.GPSStream(filestream.ReadString)
Else
Image4.LoadPicture("IconDaten2.bmp")
End If
End If
Return
connectionbreak:
..
client.close
End Sub
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
This is is a wild guess but is it anything to do with the fact that if you wait two seconds then a full message is probably available but polling more often than that it is likely that only part of a message is available. Does your app make the assumption that a full message always arrives as a single read? My experience of the network library is that even small messages can arrive as separate packets so you have to be prepared to reassemble multiple reads into a single message - which is what I believe the GPS library GPSStream method does.I can' t understand the effects of the different timerintervalls.:sign0013:
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?