Original Post
In a net game in wich key-strokes are sent during gameplay (yes I know how bad is sending key-strokes) if we calculate over the time that the avg delay is N can we adapt all the source to fit this value? explanation: consider non-blocking socket [1][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] -^ frame 1 we send keystoke caught [ ][2][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] ----^ frame 2 winsock say that the send need some other time to send the packet, we queue the value obtained at 2 [ ][ ][ ][ ][ ][ ][7][ ][ ][ ][ ][ ] -------------------^ we queue all the value 2 -> 7, at 7° frame send has finally done his work so we send all the values queued and client take care of these values for 7 - 2 frames. [ ][ ][ ][ ][ ][ ][ ][8][ ][ ][ ][ ] ----------------------^ frame 8 we begin another time this algorythm. Consider that we stop to queue value when we reach the total amount of the bytes contained in a (insert your favorite protocol here) packet in order to evitate fragmentation and that we put a inferior limit (like 2 frames in a 60 fps tipical game). What you think about this solution? I'm saying stupid things? p.s. sorry for my english and for the weird ascii notation What you think about this