Read NMEA from Server


Well-Known Member
Licensed User
Yes, Erel. I did. But that's not the problem:

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. For this problem, I need a timeout for this command.
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 first and the second are the better one, because the timeout-function from the door-lib is not only a timeout, it also disconnect the server-connection, so that there is every time a reconnect nessesary, when the timeout is triggered.
Last edited: