Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol version request #136

Closed
jirenius opened this issue Nov 13, 2019 · 1 comment
Closed

Protocol version request #136

jirenius opened this issue Nov 13, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jirenius
Copy link
Collaborator

Issue

The client needs a way to tell Resgate which version of the RES protocol it supports, to ensure a newer version of Resgate doesn't break older clients.

Solution

A new request type should be added:

Version request

method
version

Version requests are sent by the client to tell which RES protocol version it supports, and to get information on what protocol version the gateway supports.

The request SHOULD be the first request sent by the client after an established connection.

If not sent, or if the protocol property is omitted in the request, the gateway should assume the latest protocol version.

Parameters

The request parameters are optional.
It not omitted, the parameters object SHOULD have the following property:

protocol
The RES protocol version supported by the client.
MUST be a string in the format "[MAJOR].[MINOR].[PATCH]". Eg. "1.2.3".

Result

protocol
The RES protocol version supported by the gateway.
MUST be a string in the format "[MAJOR].[MINOR].[PATCH]". Eg. "1.2.3".

Error

A system.unsupportedProtocol error response will be sent if the gateway cannot support the client protocol version.
A system.invalidRequest error response will be sent if the gateway only supports RES Protocol v1.1.1 or below, prior to the introduction of the version request.

Compatibility

  • The RES Protocol will require a PATCH version update as the change will be backward compatible.
  • Current Resgate version will correctly reply with a system.invalidRequest on the request.
  • A client receiving a system.invalidRequest can act according to RES protocol v1.1.1 .
@jirenius jirenius added the enhancement New feature or request label Nov 13, 2019
@jirenius jirenius self-assigned this Nov 13, 2019
jirenius added a commit that referenced this issue Nov 13, 2019
…n-request

Feature/gh 136 protocol version request
@jirenius
Copy link
Collaborator Author

Resolved in #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant