My app maintains a TCPIP connection with other software. I use SendSocketByte() to send data.
My system sends and receives commands over this connection. When there is no traffic I send my own ping command so I can track if the connection is lost for any reason.
I have noticed that when there is no traffic and I send my ping every 10 seconds, every 6th command arrives at the other end with an addition zero byte (hex zero).
If I send my ping command every 20 seconds then, yup, every third one has the spurious nul byte.
I suspect that AppGameKit has decided to add a nul byte to TCP connections every 60 seconds. (Perhaps for its own ping system, which would be fine to do
if you control both ends).
Can anyone confirm that this is true?
Is so, this is nasty. Is there any way to clear the outgoing buffer before sending proper content?