I've ruled out the extra bytes being the version, as they change depending on how much the user types in. So I'm thinking that that it probably is the length.
However, I've re-written my program in two parts, a server and a client... and I've followed the examples given in 'threaded fortune server' and 'fortune client', but I'm still getting extra "junk" somewhere.
When I send data from the client to the server, I send the number of bytes being sent as a serialized quint16 (as in fortune server), and I extract that number on the server side and test it against bytesAvailable() (as in fortune client). Then when the server sends back to the client, I follow the same step, I send the number of bytes to be sent as a serialized quint16.
Somehow I'm still getting "junk" somewhere.
I've attached my server and client code in .zip format.
Bookmarks