[mosh-devel] Mosh extensibility

Matthieu Boutier boutier at pps.univ-paris-diderot.fr
Tue Aug 25 12:14:43 EDT 2015


Hi John,

I just think about an alternative way for extending mosh: we can use the fact that mosh packets are never empty and seqno lowest bit skippable to extend mosh in an almost clean way.

1. both client and server communicates with even seqno
   client, in addition, sends empty messages (only a network header)

2. if the server receives an empty message, it enables extensibility, and it also sends empty messages
   if the client receives an odd seqno, it knows the server is not extensible, and stops sending empty packets.

3. if the client receives an empty message, it enables extensibility, and can now send extended messages with odd seqnos.

4. when the server receives an extended message, it can also send extended messages.


Of course, mosh should then be able to deal with empty messages:

    f7bd46f8ce (Ignore empty messages at transport layer.)

Or (and), the client can wait a little bit before sending its first empty message: if it receives a certain amount of messages, all with even seqno, then there is probably no risk to send an empty packet... and if you have no anymore sign of life from the server, well, too bad, you may have kill it ! ;-)

(then, just have to define an extensible extension format!)

Matthieu





More information about the mosh-devel mailing list