boost::redis::config::use_setup

Enables using a custom requests during connection establishment.

Synopsis

Declared in <boost/redis/config.hpp>

bool use_setup = false;

Description

If set to true, the setup member will be sent to the server immediately after connection establishment. Every time a reconnection happens, the setup request will be executed before any other request. It can be used to perform authentication, subscribe to channels or select a database index.

When set to true, the custom setup request replaces the built‐in HELLO request generated by the library. The username, password, clientname and database_index fields will be ignored.

By default, setup contains a "HELLO 3" command, which upgrades the protocol to RESP3. You might modify this request as you like, but you should ensure that the resulting connection uses RESP3.

To prevent sending any setup request at all, set this field to true and setup to an empty request. This can be used to interface with systems that don't support HELLO.

By default, this field is false, and setup will not be used.

Created with MrDocs