My App talks to a server over TCP/IP using a well defined packet protocol but I’d been experiencing difficulties of the “packets seem the wrong length” type. I got the server author to debug a conversation.

Now the server sends extra bytes in the middle of messages depending upon the server version of the Client App talking to it. I found this out early on. Anything under version 43 and it omitted two bytes in the middle of the packet.

My App was set to version 200. Androids start at 100, Windows Phone (the first App was created for it) start at 0. The version number is sent as a five char string with leading 0’s so my App sends 00200. It turned out that the part of the server that verified and classified messages only checked the last two digits. D’oh!

Hence my server seemed to be version 0. Until the bug is fixed, my App is now version 00260.

Leave a Reply

Post Navigation