keithw/mosh — Issue #16: Make "late ack" a normal part of server->client stream and always send
Author: keithw
Created: 2012-02-18 07:17:33+00:00
State: open

The recent change to include a "late ack" showing which client->server keystroke would definitely have been echoed has improved the rate of spurious mispredictions, but we are only sending these opportunistically when they can piggyback. That means the client also needs a timeout trigger for when there are no more replies to piggyback on, and this timeout trigger has been firing spuriously for me, leading to partial eraser of stuff I had already typed. Also the "pending ack" is not acknowledged so if the packet carrying it is dropped, we run into trouble.

We need to convert this from a header field to a protobuf object that is inserted in the stream as pending data, just like a resize or screen delta. This should make the predictions much more robust.

Cons: If we _always_ send the "late ack," we will increase the chattiness because almost every keystroke hit will now result in TWO packets returning from the server.