Re: [Opentnl-general] Two issues related with GhostConnection.
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <ma...@ga...> - 2004-05-24 19:09:13
|
Norbert Harrer wrote: >This was not a problem up to now, because the empty packages carried >the ACKs in their header. The behaviour can also be observed when >making a release build of TNLTest with VC++ (where >mGhostZeroUpdateIndex = 0). > >I guess the solution would be to also check on pending Notfies in >isDataToTransmit(). I am not sure though. I have barely understood the >underlaying network mechanisms. > > >Thanks, >Norbert. > > Hey Norbert - good find! I actually have this on my short list as "figure out isDataToTransmit() bug" - I ran into the same thing on a release build of Zap, but fixed it by putting an override function in GameConnection. I'll take a look at the code. * Later * GhostConnection::setGhostFrom initializes mGhostZeroUpdateIndex, but this only happens if that side of the connection is sending ghost updates. So your analysis was correct - the client is never sending packets back to the server since has an empty event queue and the ghostZeroUpdateIndex is 0. The solution that I will implement is to have the NetConnection also send packets - Ack packets, if it has received packets that it has not sent acknowledgements for. This will not advance the window on the clients, since Ack packets don't use a new sequence number, but it will allow the server to send new packets. This should not be a part of isDataToTransmit, however, since that would create a new data packet - which would need to be ack'd by the server. - Mark |