MySQL 8.4.0
Source Code Documentation
ClassicFrame Class Reference

#include <classic_frame.h>

Static Public Member Functions

static stdx::expected< void, std::error_code > ensure_has_msg_prefix (Channel &src_channel, ClassicProtocolState &src_protocol)
 ensure message has a frame-header and msg-type. More...
 
template<class Proto >
static stdx::expected< void, std::error_code > ensure_has_msg_prefix (TlsSwitchableConnection< Proto > &conn)
 
static stdx::expected< void, std::error_code > ensure_has_full_frame (Channel &src_channel, ClassicProtocolState &src_protocol)
 
template<class Proto >
static stdx::expected< void, std::error_code > ensure_has_full_frame (TlsSwitchableConnection< Proto > &conn)
 
static stdx::expected< size_t, std::error_code > recv_frame_sequence (Channel &src_channel, ClassicProtocolState &src_protocol)
 recv a full message sequence into the channel's recv_plain_buffer() More...
 
static stdx::expected< void, std::error_code > ensure_server_greeting (Channel &src_channel, ClassicProtocolState &src_protocol)
 
static stdx::expected< void, std::error_code > ensure_frame_header (Channel &src_channel, ClassicProtocolState &src_protocol)
 ensure current_frame() has a current frame-info. More...
 
template<class Proto >
static stdx::expected< void, std::error_code > ensure_frame_header (TlsSwitchableConnection< Proto > &conn)
 
template<class T >
static constexpr uint8_t cmd_byte ()
 
template<class Msg , class Proto >
static stdx::expected< Msg, std::error_code > recv_msg (Channel &src_channel, Proto &src_protocol, classic_protocol::capabilities::value_type caps)
 receive a classic protocol message frame from a channel. More...
 
template<class Msg , class Proto >
static stdx::expected< Msg, std::error_code > recv_msg (Channel &src_channel, Proto &src_protocol)
 
template<class Msg , class Proto >
static stdx::expected< Msg, std::error_code > recv_msg (TlsSwitchableConnection< Proto > &conn)
 
template<class Msg , class Proto >
requires ( (std::is_same_v< Msg, classic_protocol::borrowed::message::client::StmtExecute> && std::is_same_v<Proto, ClientSideClassicProtocolState>))
static stdx::expected< Msg, std::error_code > recv_msg (Channel &src_channel, Proto &src_protocol, classic_protocol::capabilities::value_type caps)
 receive a StmtExecute message from a channel. More...
 
template<class Msg >
static stdx::expected< size_t, std::error_code > send_msg (Channel &dst_channel, ClassicProtocolState &dst_protocol, Msg msg, classic_protocol::capabilities::value_type caps)
 
template<class Msg >
static stdx::expected< size_t, std::error_code > send_msg (Channel &dst_channel, ClassicProtocolState &dst_protocol, Msg msg)
 
template<class Msg , class Proto >
static stdx::expected< size_t, std::error_code > send_msg (TlsSwitchableConnection< Proto > &conn, Msg msg, classic_protocol::capabilities::value_type caps)
 
template<class Msg , class Proto >
static stdx::expected< size_t, std::error_code > send_msg (TlsSwitchableConnection< Proto > &conn, Msg msg)
 
static void trace_set_attributes (TraceEvent *ev, ClassicProtocolState &src_protocol, const classic_protocol::borrowed::message::server::Ok &msg)
 set attributes from the Ok message in the TraceEvent. More...
 
static void trace_set_attributes (TraceEvent *ev, ClassicProtocolState &src_protocol, const classic_protocol::borrowed::message::server::Eof &msg)
 set attributes from the Eof message in the TraceEvent. More...
 
static void trace_set_attributes (TraceEvent *ev, ClassicProtocolState &src_protocol, const classic_protocol::borrowed::message::server::Error &msg)
 set attributes from the Eof message in the TraceEvent. More...
 

Member Function Documentation

◆ cmd_byte()

template<class T >
static constexpr uint8_t ClassicFrame::cmd_byte ( )
inlinestaticconstexpr

◆ ensure_frame_header() [1/2]

stdx::expected< void, std::error_code > ClassicFrame::ensure_frame_header ( Channel src_channel,
ClassicProtocolState src_protocol 
)
static

ensure current_frame() has a current frame-info.

Postcondition
after success returned, src_protocol->current_frame() has a frame decoded.

◆ ensure_frame_header() [2/2]

template<class Proto >
static stdx::expected< void, std::error_code > ClassicFrame::ensure_frame_header ( TlsSwitchableConnection< Proto > &  conn)
inlinestatic

◆ ensure_has_full_frame() [1/2]

stdx::expected< void, std::error_code > ClassicFrame::ensure_has_full_frame ( Channel src_channel,
ClassicProtocolState src_protocol 
)
static

◆ ensure_has_full_frame() [2/2]

template<class Proto >
static stdx::expected< void, std::error_code > ClassicFrame::ensure_has_full_frame ( TlsSwitchableConnection< Proto > &  conn)
inlinestatic

◆ ensure_has_msg_prefix() [1/2]

stdx::expected< void, std::error_code > ClassicFrame::ensure_has_msg_prefix ( Channel src_channel,
ClassicProtocolState src_protocol 
)
static

ensure message has a frame-header and msg-type.

Return values
trueif src-protocol's recv-buffer has frame-header and msg-type.

◆ ensure_has_msg_prefix() [2/2]

template<class Proto >
static stdx::expected< void, std::error_code > ClassicFrame::ensure_has_msg_prefix ( TlsSwitchableConnection< Proto > &  conn)
inlinestatic

◆ ensure_server_greeting()

static stdx::expected< void, std::error_code > ClassicFrame::ensure_server_greeting ( Channel src_channel,
ClassicProtocolState src_protocol 
)
static

◆ recv_frame_sequence()

stdx::expected< size_t, std::error_code > ClassicFrame::recv_frame_sequence ( Channel src_channel,
ClassicProtocolState src_protocol 
)
static

recv a full message sequence into the channel's recv_plain_buffer()

◆ recv_msg() [1/4]

template<class Msg , class Proto >
static stdx::expected< Msg, std::error_code > ClassicFrame::recv_msg ( Channel src_channel,
Proto &  src_protocol 
)
inlinestatic

◆ recv_msg() [2/4]

template<class Msg , class Proto >
static stdx::expected< Msg, std::error_code > ClassicFrame::recv_msg ( Channel src_channel,
Proto &  src_protocol,
classic_protocol::capabilities::value_type  caps 
)
inlinestatic

receive a classic protocol message frame from a channel.

◆ recv_msg() [3/4]

template<class Msg , class Proto >
requires ( (std::is_same_v< Msg, classic_protocol::borrowed::message::client::StmtExecute> && std::is_same_v<Proto, ClientSideClassicProtocolState>))
static stdx::expected< Msg, std::error_code > ClassicFrame::recv_msg ( Channel src_channel,
Proto &  src_protocol,
classic_protocol::capabilities::value_type  caps 
)
inlinestatic

receive a StmtExecute message from a channel.

specialization of recv_msg<> as StmtExecute needs a the data from the StmtPrepareOk.

◆ recv_msg() [4/4]

template<class Msg , class Proto >
static stdx::expected< Msg, std::error_code > ClassicFrame::recv_msg ( TlsSwitchableConnection< Proto > &  conn)
inlinestatic

◆ send_msg() [1/4]

template<class Msg >
static stdx::expected< size_t, std::error_code > ClassicFrame::send_msg ( Channel dst_channel,
ClassicProtocolState dst_protocol,
Msg  msg 
)
inlinestatic

◆ send_msg() [2/4]

template<class Msg >
static stdx::expected< size_t, std::error_code > ClassicFrame::send_msg ( Channel dst_channel,
ClassicProtocolState dst_protocol,
Msg  msg,
classic_protocol::capabilities::value_type  caps 
)
inlinestatic

◆ send_msg() [3/4]

template<class Msg , class Proto >
static stdx::expected< size_t, std::error_code > ClassicFrame::send_msg ( TlsSwitchableConnection< Proto > &  conn,
Msg  msg 
)
inlinestatic

◆ send_msg() [4/4]

template<class Msg , class Proto >
static stdx::expected< size_t, std::error_code > ClassicFrame::send_msg ( TlsSwitchableConnection< Proto > &  conn,
Msg  msg,
classic_protocol::capabilities::value_type  caps 
)
inlinestatic

◆ trace_set_attributes() [1/3]

void ClassicFrame::trace_set_attributes ( TraceEvent ev,
ClassicProtocolState src_protocol,
const classic_protocol::borrowed::message::server::Eof msg 
)
static

set attributes from the Eof message in the TraceEvent.

◆ trace_set_attributes() [2/3]

void ClassicFrame::trace_set_attributes ( TraceEvent ev,
ClassicProtocolState src_protocol,
const classic_protocol::borrowed::message::server::Error msg 
)
static

set attributes from the Eof message in the TraceEvent.

◆ trace_set_attributes() [3/3]

void ClassicFrame::trace_set_attributes ( TraceEvent ev,
ClassicProtocolState src_protocol,
const classic_protocol::borrowed::message::server::Ok msg 
)
static

set attributes from the Ok message in the TraceEvent.


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