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

[feature request]bolt v2 support #22

Open
wanderxjtu opened this issue Aug 13, 2021 · 1 comment
Open

[feature request]bolt v2 support #22

wanderxjtu opened this issue Aug 13, 2021 · 1 comment

Comments

@wanderxjtu
Copy link
Collaborator

Support bolt v2 codec.

the mainly change in bolt v2 is to support optional crc32 verification.

Spec:

Request command protocol for v2
** request definition **

 0     1     2           4           6           8          10     11     12          14         16
 +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+-----+-----+-----+-----+
 |proto| ver1|type | cmdcode   |ver2 |   requestId           |codec|switch|   timeout             |
 +-----------+-----------+-----------+-----------+-----------+------------+-----------+-----------+
 |classLen   |headerLen  |contentLen             |           ...                                  |
 +-----------+-----------+-----------+-----------+                                                +
 |               className + header  + content  bytes                                             |
 +                                                                                                +
 |                               ... ...                                  | CRC32(optional)       |
 +------------------------------------------------------------------------------------------------+

Response command protocol for v2
** response definition **

 0     1     2     3     4           6           8          10     11    12          14          16
 +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+-----+-----+-----+-----+
 |proto| ver1| type| cmdcode   |ver2 |   requestId           |codec|switch|respstatus |  classLen |
 +-----------+-----------+-----------+-----------+-----------+------------+-----------+-----------+
 |headerLen  | contentLen            |                      ...                                   |
 +-----------------------------------+                                                            +
 |               className + header  + content  bytes                                             |
 +                                                                                                +
 |                               ... ...                                  | CRC32(optional)       |
 +------------------------------------------------------------------------------------------------+

respstatus: response status

@wanderxjtu
Copy link
Collaborator Author

What is need to be done:

  • Subclasses for v2 bolt headers
  • Server decoder needs to read proto first, than deside which bolt header class were to use.
  • Server should use same codecs to build response package.
  • Allow a optional arguments in Client to choose proto.

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

No branches or pull requests

1 participant