Re: version negotiation
Tõivo Leedjärv <[email protected]> Wed, 30 Jun 2021 19:00:10 +0200
| Newsgroups | gmane.network.unison.devel |
|---|---|
| Message-ID | <CAALvpZR8eGToN+UnZ3vJ4K20tXK7eFDtdncbKHJ6N3v4V0OJ3Q@mail.gmail.com> |
On Wed, Jun 30, 2021 at 6:42 PM Tõivo Leedjärv <[email protected]> wrote: > > I'll keep thinking about it. There could be some tricky ways, abusing > the current protocol, like sending two 'write tokens' instead of > one... I looked in the code. This may very well be a perfectly working solution. Sending multiple 'write tokens' in sequence should not break the old clients. Let's say it works like this. Old server: 1. Sends header string. 2. <old protocol is enabled> Sends write token. 3. Old protocol communication. New server: 1. Sends old header string. 2. <old protocol is enabled> Sends, let's say 5 write tokens. 3a. Old client will process all 5 separately and continue old protocol communication normally. 3b. New client will know it is a magic signal and switch to protocol negotiation mode. This works because the 'write token' does not depend on OCaml version or Marshal module. That's the theory. It is easy enough to try out, so that's what I'll do. _______________________________________________ Unison-hackers mailing list [email protected] https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers