rabbitControl / RCP

Remote Control Protocol
GNU Lesser General Public License v3.0
32 stars 0 forks source link

rfc: considering mandatory version-handshake #25

Closed joreg closed 3 years ago

joreg commented 4 years ago

we're considering introducing a mandatory version-handshake as part of the protocol, after the connection was established. this is to enforce handling of versions on both ends (client/server). typically the connection will be closed if the client and server versions do not match.

but we can also see the special case, where the end with the higher version can decide if the connection will work or should be closed. this is because the end with the higher number may be backwards compatible.

proposed sequence of events:

e.g.: client-version: 0.0.1 server-version: 0.0.0

  1. server is not capable of deciding, lets client decide
  2. server sends version
  3. client either closes the connection or sends initialize-command

client-version: 0.0.0 server-version: 0.0.1

  1. server decides if it can handle that client
    • yes: server sends version info client sends initialize
    • no: server sends empty info to signal version missmatch and closes connection
i-n-g-o commented 3 years ago

after further considering there seems to be no benefit in specifying a mandatory version-handshake. a version-handshake is current implemented in the web-client and is considered good practice. other clients may do this differently.