Hello!
It's a problem, that I want to place in a new thread, because up to the present, there is no solution.
My network-application locks up in the line filestream.readsting, when the server stops sending data. The reason for the problem is:
Client.dataavailable realize, that there is data in the stream. Filestream.readsting reads the protocoll from start-bit to the finish-bit. When the server stops sending, the finish-bit (LAST_ACK) don't arrive, so the client locks up in the line filestream.readsting. Client.dataavailable only notes, that there is data in the stream, but not, that it is a noncomplete TCP-protocol without the finish-bit.
I think, that there are three attempts at a solution:
1. client.dataavailable realize, that there is no complete TCP-protocoll in the stream and gets false,
2. filestream.readstring doesn't need a finish-bit of the TCP-protocoll,
3. filestream.readstring contains a timeout-function.
The door-lib contains such a timeout-function, but it only runs on the desktop, not on the device.
Did anybody know, how I can prevent a lock up in the filestream.readstring? Perhaps there are some other solutions....
:sign0085:
It's a problem, that I want to place in a new thread, because up to the present, there is no solution.
B4X:
if client.dataavailable=true then
gps.gpsstream(filestream.readsting)
end if
My network-application locks up in the line filestream.readsting, when the server stops sending data. The reason for the problem is:
Client.dataavailable realize, that there is data in the stream. Filestream.readsting reads the protocoll from start-bit to the finish-bit. When the server stops sending, the finish-bit (LAST_ACK) don't arrive, so the client locks up in the line filestream.readsting. Client.dataavailable only notes, that there is data in the stream, but not, that it is a noncomplete TCP-protocol without the finish-bit.
I think, that there are three attempts at a solution:
1. client.dataavailable realize, that there is no complete TCP-protocoll in the stream and gets false,
2. filestream.readstring doesn't need a finish-bit of the TCP-protocoll,
3. filestream.readstring contains a timeout-function.
The door-lib contains such a timeout-function, but it only runs on the desktop, not on the device.
Did anybody know, how I can prevent a lock up in the filestream.readstring? Perhaps there are some other solutions....
:sign0085: