MySQL 9.1.0
Source Code Documentation
ClassicProtocolState Class Reference

protocol state of a classic protocol connection. More...

#include <classic_protocol_state.h>

Inheritance diagram for ClassicProtocolState:
[legend]

Classes

struct  FrameInfo
 
class  SystemVariables
 system-variables as returned by the server. More...
 

Public Types

enum class  HandshakeState { kConnected , kServerGreeting , kClientGreeting , kFinished }
 

Public Member Functions

 ClassicProtocolState ()=default
 
 ClassicProtocolState (classic_protocol::capabilities::value_type server_caps, classic_protocol::capabilities::value_type client_caps, std::optional< classic_protocol::message::server::Greeting > server_greeting, std::string username, std::string schema, std::string attributes)
 
void server_capabilities (classic_protocol::capabilities::value_type caps)
 
void client_capabilities (classic_protocol::capabilities::value_type caps)
 
classic_protocol::capabilities::value_type client_capabilities () const
 
classic_protocol::capabilities::value_type server_capabilities () const
 
classic_protocol::capabilities::value_type shared_capabilities () const
 
std::optional< classic_protocol::message::client::Greetingclient_greeting () const
 
void client_greeting (std::optional< classic_protocol::message::client::Greeting > msg)
 
std::optional< classic_protocol::message::server::Greetingserver_greeting () const
 
void server_greeting (std::optional< classic_protocol::message::server::Greeting > msg)
 
uint8_t & seq_id ()
 
uint8_t seq_id () const
 
void seq_id (uint8_t id)
 
std::optional< FrameInfo > & current_frame ()
 
const std::optional< FrameInfo > & current_frame () const
 
std::optional< uint8_t > & current_msg_type ()
 
const std::optional< uint8_t > & current_msg_type () const
 
std::string auth_method_name () const
 
void auth_method_name (std::string name)
 
std::string auth_method_data () const
 
void auth_method_data (std::string data)
 
std::string username ()
 
void username (std::string user)
 
std::string schema ()
 
void schema (std::string s)
 
std::string attributes ()
 
void attributes (std::string attrs)
 
std::string sent_attributes ()
 
void sent_attributes (std::string attrs)
 
HandshakeState handshake_state () const
 
void handshake_state (HandshakeState state)
 
SystemVariablessystem_variables ()
 
const SystemVariablessystem_variables () const
 

Public Attributes

uint64_t columns_left {}
 
uint32_t params_left {}
 

Private Attributes

classic_protocol::capabilities::value_type server_caps_ {}
 
classic_protocol::capabilities::value_type client_caps_ {}
 
std::optional< classic_protocol::message::client::Greetingclient_greeting_ {}
 
std::optional< classic_protocol::message::server::Greetingserver_greeting_ {}
 
std::optional< FrameInfocurrent_frame_ {}
 
std::optional< uint8_t > msg_type_ {}
 
uint8_t seq_id_ {255}
 
std::string username_
 
std::string schema_
 
std::string recv_attributes_
 
std::string sent_attributes_
 
std::string auth_method_name_
 
std::string auth_method_data_
 
classic_protocol::status::value_type status_flags_ {}
 
HandshakeState handshake_state_ {HandshakeState::kConnected}
 
SystemVariables system_variables_
 

Detailed Description

protocol state of a classic protocol connection.

Member Enumeration Documentation

◆ HandshakeState

Enumerator
kConnected 
kServerGreeting 
kClientGreeting 
kFinished 

Constructor & Destructor Documentation

◆ ClassicProtocolState() [1/2]

ClassicProtocolState::ClassicProtocolState ( )
default

◆ ClassicProtocolState() [2/2]

ClassicProtocolState::ClassicProtocolState ( classic_protocol::capabilities::value_type  server_caps,
classic_protocol::capabilities::value_type  client_caps,
std::optional< classic_protocol::message::server::Greeting server_greeting,
std::string  username,
std::string  schema,
std::string  attributes 
)
inline

Member Function Documentation

◆ attributes() [1/2]

std::string ClassicProtocolState::attributes ( )
inline

◆ attributes() [2/2]

void ClassicProtocolState::attributes ( std::string  attrs)
inline

◆ auth_method_data() [1/2]

std::string ClassicProtocolState::auth_method_data ( ) const
inline

◆ auth_method_data() [2/2]

void ClassicProtocolState::auth_method_data ( std::string  data)
inline

◆ auth_method_name() [1/2]

std::string ClassicProtocolState::auth_method_name ( ) const
inline

◆ auth_method_name() [2/2]

void ClassicProtocolState::auth_method_name ( std::string  name)
inline

◆ client_capabilities() [1/2]

classic_protocol::capabilities::value_type ClassicProtocolState::client_capabilities ( ) const
inline

◆ client_capabilities() [2/2]

void ClassicProtocolState::client_capabilities ( classic_protocol::capabilities::value_type  caps)
inline

◆ client_greeting() [1/2]

std::optional< classic_protocol::message::client::Greeting > ClassicProtocolState::client_greeting ( ) const
inline

◆ client_greeting() [2/2]

void ClassicProtocolState::client_greeting ( std::optional< classic_protocol::message::client::Greeting msg)
inline

◆ current_frame() [1/2]

std::optional< FrameInfo > & ClassicProtocolState::current_frame ( )
inline

◆ current_frame() [2/2]

const std::optional< FrameInfo > & ClassicProtocolState::current_frame ( ) const
inline

◆ current_msg_type() [1/2]

std::optional< uint8_t > & ClassicProtocolState::current_msg_type ( )
inline

◆ current_msg_type() [2/2]

const std::optional< uint8_t > & ClassicProtocolState::current_msg_type ( ) const
inline

◆ handshake_state() [1/2]

HandshakeState ClassicProtocolState::handshake_state ( ) const
inline

◆ handshake_state() [2/2]

void ClassicProtocolState::handshake_state ( HandshakeState  state)
inline

◆ schema() [1/2]

std::string ClassicProtocolState::schema ( )
inline

◆ schema() [2/2]

void ClassicProtocolState::schema ( std::string  s)
inline

◆ sent_attributes() [1/2]

std::string ClassicProtocolState::sent_attributes ( )
inline

◆ sent_attributes() [2/2]

void ClassicProtocolState::sent_attributes ( std::string  attrs)
inline

◆ seq_id() [1/3]

uint8_t & ClassicProtocolState::seq_id ( )
inline

◆ seq_id() [2/3]

uint8_t ClassicProtocolState::seq_id ( ) const
inline

◆ seq_id() [3/3]

void ClassicProtocolState::seq_id ( uint8_t  id)
inline

◆ server_capabilities() [1/2]

classic_protocol::capabilities::value_type ClassicProtocolState::server_capabilities ( ) const
inline

◆ server_capabilities() [2/2]

void ClassicProtocolState::server_capabilities ( classic_protocol::capabilities::value_type  caps)
inline

◆ server_greeting() [1/2]

std::optional< classic_protocol::message::server::Greeting > ClassicProtocolState::server_greeting ( ) const
inline

◆ server_greeting() [2/2]

void ClassicProtocolState::server_greeting ( std::optional< classic_protocol::message::server::Greeting msg)
inline

◆ shared_capabilities()

classic_protocol::capabilities::value_type ClassicProtocolState::shared_capabilities ( ) const
inline

◆ system_variables() [1/2]

SystemVariables & ClassicProtocolState::system_variables ( )
inline

◆ system_variables() [2/2]

const SystemVariables & ClassicProtocolState::system_variables ( ) const
inline

◆ username() [1/2]

std::string ClassicProtocolState::username ( )
inline

◆ username() [2/2]

void ClassicProtocolState::username ( std::string  user)
inline

Member Data Documentation

◆ auth_method_data_

std::string ClassicProtocolState::auth_method_data_
private

◆ auth_method_name_

std::string ClassicProtocolState::auth_method_name_
private

◆ client_caps_

classic_protocol::capabilities::value_type ClassicProtocolState::client_caps_ {}
private

◆ client_greeting_

std::optional<classic_protocol::message::client::Greeting> ClassicProtocolState::client_greeting_ {}
private

◆ columns_left

uint64_t ClassicProtocolState::columns_left {}

◆ current_frame_

std::optional<FrameInfo> ClassicProtocolState::current_frame_ {}
private

◆ handshake_state_

HandshakeState ClassicProtocolState::handshake_state_ {HandshakeState::kConnected}
private

◆ msg_type_

std::optional<uint8_t> ClassicProtocolState::msg_type_ {}
private

◆ params_left

uint32_t ClassicProtocolState::params_left {}

◆ recv_attributes_

std::string ClassicProtocolState::recv_attributes_
private

◆ schema_

std::string ClassicProtocolState::schema_
private

◆ sent_attributes_

std::string ClassicProtocolState::sent_attributes_
private

◆ seq_id_

uint8_t ClassicProtocolState::seq_id_ {255}
private

◆ server_caps_

classic_protocol::capabilities::value_type ClassicProtocolState::server_caps_ {}
private

◆ server_greeting_

std::optional<classic_protocol::message::server::Greeting> ClassicProtocolState::server_greeting_ {}
private

◆ status_flags_

classic_protocol::status::value_type ClassicProtocolState::status_flags_ {}
private

◆ system_variables_

SystemVariables ClassicProtocolState::system_variables_
private

◆ username_

std::string ClassicProtocolState::username_
private

The documentation for this class was generated from the following file: