Table of Contents
Handshake
Description
Identify the version of the protocol being used by the client and server. Note that there is both a major and minor version number, and while the major version has already been sent as part of the binary connection negotiation (as that version may be needed to even read this handshake message), it is still required in this message for completeness sake. The connection_API.proto file contains enums for the version fields where MajorVerions.CURRENT_MAJOR_VERSION and MinorVersions.CURRENT_MINOR_VERSION will be the version implemented by this package of proto files.
Request
HandshakeRequest | |||
Field Name | Data type | Description | Mandatory? |
---|---|---|---|
majorVersion | int32 | The major version of the client's protocol | Y |
minorVersion | int32 | The minor version of the client's protocol | Y |
...
Y |
Response
HandshakeResponse | |||
Field Name | Data type | Description | Mandatory? |
---|---|---|---|
serverMajorVersion | int32 | The major version of the servers protocol | Y |
serverMinorVersion | int32 | The minor version of the server's protocol | Y |
handshakePassed | boolean | Whether the server is able to communicate with the client's protocol version | Y |
Expected behavior
If the server returns a handshakePassed of true, the client can then proceed to send any messages defined in it's version of the protocol and expect the corresponding response messages.
- Prior to a successful handshake operations, every other request sent to the server should fail with a HANDSHAKE_REQUIRED error.
Errors
...
Error Code | Error Definition | Error Description |
---|---|---|
1102 | UNSUPPORTED_OPERATION | This will be returned in response to a HandshakeRequest if the handshake has already been completed for this connection |