From be53d40694e59f9ef48d8a8106004623bddc703b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 May 2017 11:02:58 -0400 Subject: add protocol version This is distinct from the wire protocol version used in the websocket framing of messages. Versioning the high level protocol will let later features be added. The user controls the protocol version, since they send the first several messages. Developers that connect need to avoid using features from newer protocol versions. So, developers and servers will need to support the most recent version, while the user can have an old version of debug-me and it will continue to work. This commit changes the protocol buffer encoding, and is the last such free change. All changes past this point will need to be versioned. This commit was sponsored by Jochen Bartl on Patreon. --- doc/protocol.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/protocol.mdwn b/doc/protocol.mdwn index 2c4887e..94f4ee1 100644 --- a/doc/protocol.mdwn +++ b/doc/protocol.mdwn @@ -107,3 +107,13 @@ The prevActivity and prevEntered hashes are actually not included in the data sent across the wire. They are left out to save space, and get added back in by the receiver. The receiver uses the signature of the message to tell when it's found the right hashes to add back in. + +## protocol versioning + +The SessionKey control messages include a field for the protocol version. +Since the user starts by sending a SessionKey, the included version +specifies the protocol version used by the rest of the protocol. When +developers connect, their clients will need to check that version, +and avoid sending any messages using features from a later version. + +The current protocol version is "1". -- cgit v1.2.3