iproto: introduce IPROTO_ID request
The new request can be used by a client to let the server know about supported IPROTO protocol features. The request body contains two fields: IPROTO protocol version and supported IPROTO protocol features. In reply to a IPROTO_ID request, the server sends its own protocol version and supported features. Currently, the actual protocol version is 1 and there are two features defined which are always set - streams and transactions. Part of #6253 @TarantoolBot document Title: Document IPROTO_ID request The new request code is 73. It takes a map in the body with the following keys: - IPROTO_VERSION (0x54) - protocol version (unsigned). - IPROTO_FEATURES (0x55) - array of protocol feature ids (unsigned). A client (connector) can send this request to let the server know about the protocol version and features it supports. The server may enable or disable certain functionality basing on the features supported by the client. In reply to the request, the server sends an IPROTO_OK response, in the body of which it reports its own protocol version and features (the format of the response body is the same as the request body). The request doesn't need authentication to pass. Currently, the actual protocol version is 1 and there are two features defined: - IPROTO_FEATURE_STREAMS - streams support (IPROTO_STREAM_ID header key), id = 0. - IPROTO_FEATURE_TRANSACTIONS - transactions support (IPROTO_BEGIN, IPROTO_COMMIT, IPROTO_ROLLBACK commands), id = 1.
Showing
- changelogs/unreleased/gh-6253-iproto-id.md 5 additions, 0 deletionschangelogs/unreleased/gh-6253-iproto-id.md
- src/box/CMakeLists.txt 1 addition, 1 deletionsrc/box/CMakeLists.txt
- src/box/iproto.cc 14 additions, 0 deletionssrc/box/iproto.cc
- src/box/iproto_constants.c 4 additions, 0 deletionssrc/box/iproto_constants.c
- src/box/iproto_constants.h 6 additions, 0 deletionssrc/box/iproto_constants.h
- src/box/iproto_features.c 65 additions, 0 deletionssrc/box/iproto_features.c
- src/box/iproto_features.h 118 additions, 0 deletionssrc/box/iproto_features.h
- src/box/xrow.c 77 additions, 0 deletionssrc/box/xrow.c
- src/box/xrow.h 42 additions, 0 deletionssrc/box/xrow.h
- test/box-py/iproto.result 13 additions, 0 deletionstest/box-py/iproto.result
- test/box-py/iproto.test.py 31 additions, 0 deletionstest/box-py/iproto.test.py
Loading
Please register or sign in to comment